Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-27 Thread Damon Getsman
Sorry, had some guests over the weekend, and I was unable to continue
with the thread for a bit.  I hope you guys are willing to catch up
where you left off, I still haven't been able to get apache+php+mysql
working again on my server since the 4.9-5.0 upgrade, and I really need
my wiki and other associated services here.  Managed to get done with my
speech without them, at least.  *grin*  Still really could've used the
wiki for the reference gathering, though.  Thankfully nobody asked me
for references.

So, here is the output from php -m:
Mon May 27 20:01
contract:/home/ftp$ php -m
[PHP Modules]
bcmath
calendar
ctype
date
dom
exif
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mysql
openssl
pcre
PDO
posix
Reflection
session
SimpleXML
sockets
SPL
standard
suhosin
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
Suhosin

-=-=-=-=-
So it looks like at least from the command-line invoked php, things are
loading the mysql version just fine.  And I checked, yes, and mysqld is
running via invocation of mysqld_safe.

I'll post the appropriate snippets from all of the php*.ini files
scattered about my installation in just a bit here as soon as I can
gather them all together.  A visitor has stopped by again, so I must
take a brief respite.



On Wed, May 22, 2013 at 7:18 PM, Richard Toohey 
richardtoo...@paradise.net.nz wrote:

 On 05/23/13 12:08, Damon Getsman wrote:

 Okay, now I've got the phpinfo output.  Nothing is jumpin' out at me,
 if y'all care to take a look at it I've got it available at
 bismaninfo.hopto.org/debug.php for a limited time here.


  No mysql in the output.

 What does php -m give you, etc.

 It's like the message you are getting - something is up with the mysql
 extension in your install.

 Check the ini files, etc.

 You are using the base Apache and PHP is working - you need to look at the
 mysql extension and find out why it is not enabled or not loading.



Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
 Hello all, and thank you for taking the time to take a look at
this issue that I am currently having.  I've been a strong advocate of
OpenBSD for some time, but have only recently taken steps to start
upgrading some of my machines instead of reinstalling.
My primary server was a 4.9 installation, and it was running
apache, with PHP and MySQL integrated for the purpose of serving a
mediawiki, a gallery2 installation, and a few other utilities that I
have had up for myself and some friends.  Unfortunately, ever since I've
made the leap from 4.9 to 5.0, I've been unable to get anything other
than plain HTML documents to display via apache.  The server tells me
that there are either '500' server errors or with a little more detail
MediaWiki tells me (Can't contact the database server: MySQL functions
missing, have you compiled PHP with the --with-mysql option? ).
Now according to the pkg_info listing that I have, I _believe_
that I have all of the proper packages and libraries installed, but I
guess I am mistaken as I'm still not able to serve pages up with any
sort of MySQL back end handling.  Here is the output of 'pkg_info -a -m'
for anybody who cares to verify this:

BitTorrent-4.4.0p10 cooperative file distribution system implemented in
Python
ImageMagick-6.6.6.10p0 image processing tools
alacarte-0.12.4p7   easy GNOME menu editing tool
apache-httpd-2.2.15p0 apache HTTP server
apcupsd-3.14.8p2daemon for controlling APC UPSes
archie-1.4.1Prospero client for the archie service
bash-4.2.10 GNU Bourne Again Shell
beav-1.40.15binary editor and viewer
bzip2-1.0.6 block-sorting file compressor, unencumbered
calc-2.11.7 C-style arbitrary precision calculator
camlimages-3.0.2p0  image manipulation functions for Objective Caml
check_bioctl-1.9Nagios plugin to check RAID status with bioctl
check_email_delivery-0.7.0 Nagios plugin to check full email delivery loop
(SMTP
/IMAP)
check_hw_sensors-1.42 Nagios plugin to monitor sysctl hw.sensors
check_mssql_health-1.5.3 Nagios plugin to check Microsoft SQL Server
check_openbgpd-1.5  Nagios plugin to monitor OpenBGPd peers
cups-1.4.7p0Common Unix Printing System
cups-pdf-2.5.1  PDF backend for CUPS
curl-7.21.7 get files from FTP, Gopher, HTTP or HTTPS servers
dosbox-0.74p0   x86 with DOS emulator targeted at playing games
emacs-22.3p10   GNU editor: extensible, customizable, self-documenting
fedora_base-4.0p8   Linux compatibility package based on Fedora Core 4
firefox-5.0p3   Mozilla web browser
firefox35-3.5.19p2  Mozilla web browser
ghostview-1.5p3 X11 front-end for ghostscript
git-1.7.6p0 GIT - Tree History Storage Tool
git-svn-1.7.6p0 GIT - subversion interoperability tools
git-x11-1.7.6p0 GIT - graphical tools
gnome-common-2.34.0 common automake macros for GNOME
gnome-desktop-2.32.1p4 components for the GNOME desktop
gnome-mplayer-1.0.4p1 GTK+/GNOME frontend for MPlayer
gnome-panel-2.32.1p5 GNOME panel
gnome-screensaver-2.30.2p2 screen saver and locker for GNOME
gnome-system-monitor-2.28.2p6 sytem monitor for GNOME
gnome-system-tools-2.32.0p6 sytem configuration GUI for desktops
gnuchess-5.08   chess program
gpgme-1.1.5p1   GnuPG Made Easy
gstoraster-1.03p0   filter to convert PostScript or PDF to cups raster
format
ircII-20081115p0Internet Relay Chat client
ispell-3.2.06p6 interactive spelling checker
jove-4.16p1 Jonathan's Own Version of Emacs
kdebase-3.5.10p13   K Desktop Environment, basic applications
kermit-8.0.211  serial and network communications package
latex-mk-1.9.1p0set of Makefile fragments to manage LaTeX documents
libpurple-2.9.0 multi-protocol instant messaging library
libreoffice-3.4.1.3p1v0 multi-platform productivity suite
mediawiki-1.15.5p3  web-based collaborative editing environment
minicom-2.2p0   MS-DOS Telix-like serial communication program
mpg123-1.13.1   fast console MPEG audio player and decoder library
mrtg-2.17.1p1   multi-router traffic grapher
mutt-1.5.21v0-sasl  tty-based e-mail client, development version
mysql-server-5.1.54p9 multithreaded SQL database (server)
ncftp-3.2.3 ftp replacement with advanced user interface
nethack-3.4.3p4-qt  dungeon explorin', hackin', game.  Piece of cake
nmap-5.51p0 scan ports and fingerprint stack of network hosts
ntop-1.1network usage, interface similar to top(1)
ntp-4.2.6pl2p7  Network Time Protocol reference implementation
ocaml-3.12.0p0  ML language based on complete class-based objective
system
oinkmaster-2.0p0update your Snort rules
p7zip-9.20.1file archiver with high compression ratio
partial-wordpress-3.0.2 standard compliant weblog
pgp-2.6.3   Pretty Good Privacy 2.6.3ia
php-5.2.17p5server-side HTML-embedded scripting language
php-curl-5.2.17p3   curl URL library extensions for php5
php-gd-5.2.17p4 image manipulation extensions for php5
php-imap-5.2.17p3   imap, pop3 and nntp 

Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey
 for php5
php-imap-5.2.17p3   imap, pop3 and nntp extensions for php5
php-mcrypt-5.2.17p3 mcrypt encryption/decryption extensions for php5
php-mhash-5.2.17p3  mhash extensions for php5
php-mysql-5.2.17p3  mysql database access extensions for php5
phpMyAdmin-3.4.3.2  tool to handle the administration of MySQL over the web
pico-5.04p1 UW text editor
pidgin-2.9.0-gtkspell multi-protocol instant messaging client
pkglocatedb-0.1 database of packages for use with locate(1)
pork-0.99.8.1   programmable ncurses-based AIM client
python-2.5.4p13 interpreted object-oriented programming language
python-2.6.6p0  interpreted object-oriented programming language
quirks-1.53 exceptions to pkg_add rules
rsync-3.0.8p0   mirroring/synchronization over low bandwidth links
rtorrent-0.8.6p2ncurses BitTorrent client based on libTorrent
rxvt-2.7.10p6   color, low memory usage, xterm replacement
samba-3.5.10-cups   SMB and CIFS client and server for UNIX
screen-4.0.3p2  multi-screen window manager
snort-2.8.6-mysql   highly flexible sniffer/NIDS
spidermonkey-1.9.2.16p0v0 Mozilla C implementation of JavaScript
subversion-1.6.15p0-gnome_keyring subversion revision control system
texlive_base-2010p3 base binaries for TeXLive typesetting distribution
texlive_texmf-minimal-2010p1 texlive texmf for laTeX/PdfTeX
tin-1.8.3p2 threaded NNTP- and spool-based UseNet newsreader
tor-0.2.1.30p0  anonymity service using onion routing
trafshow-3.1full screen visualization of network traffic
transmission-2.13p0 lightweight BitTorrent command line and daemon client
transmission-qt-2.13 lightweight BitTorrent client with Qt interface
unrar-4.00v0extract, list, and test RAR archives
unzip-6.0p0 extract, list  test files in a ZIP archive
vim-7.3.154p1-gtk2  vi clone, many additional features
vlc-1.0.6p33VideoLAN client; multimedia player
wget-1.12p1 retrieve files from the web via HTTP, HTTPS and FTP
wordpress-3.1.2p1   standard compliant weblog
xsane-0.998p1   scanner frontend for SANE
xscreensaver-5.12   screen saver and locker for the X Window System
xv-3.10ap10 X11 image display and modification tool
ytalk-3.1.1p1   enhanced talk that allows for multiple parties
zip-3.0 create/update ZIP files compatible with PKZip(tm)

Any help or pointers in the right direction that can be offered
will be very much appreciated, I really need to get my wiki back up for
some work that I need to be doing on a speech that is to be given this
weekend.  Thanks guys, let me know if you need anything more, I'll do my
best to come up with whatever info, logs, or whatever you may need.

-Damon



1. Are you using the base Apache or the installed 2.2?

2. Doubt anyone is still running on 5.0 - any reason you are on an 
out-of-date version?  You might as well keep going until you get to 5.3 
and then people will have the same set-up as you.


3. You understand chroot, etc., if applicable? 
http://www.openbsd.org/faq/faq10.html#httpdchroot  Depends on your 
answer to 1.


4. Bump up PHP error_reporting - make sure that's telling you as much as 
possible (but if thinks mysql functions are missing might not be much 
more to tell you!)


Apache, PHP, MySQL definitely work on OpenBSD - I use the base Apache, 
though, so not sure of the wrinkles in using the 2.2 line.




Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Richard:

Not sure if I'm using the base apache or 2.2.  Here's what
httpd -V is showing me:

Wed May 22 17:50
contract:~$ httpd -V
Server version: Apache/1.3.29 (Unix)
Server's Module Magic Number: 19990320:15
Server compiled with
 -D EAPI
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_MMAP_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FLOCK_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D DYNAMIC_MODULE_LIMIT=64
 -D HARD_SERVER_LIMIT=256
 -D HTTPD_ROOT=/var/www
 -D SUEXEC_BIN=/usr/sbin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/httpd.scoreboard
 -D DEFAULT_LOCKFILE=logs/httpd.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf
 -D ACCESS_CONFIG_FILE=conf/access.conf
 -D RESOURCE_CONFIG_FILE=conf/srm.conf

I stopped at 5.0 because I figured that if I was having
problems at this point pushing it further might create more until I get
them resolved.  If I'm wrong about that I'll certainly push it up to
5.3.  I've got another machine here that I've installed 5.2 on
recently, I'll take that one up to 5.3 just to get used to it (it's not
a server machine).
I do understand the 'chroot' concept, not sure how exactly it's
applicable in this case; despite the fact that I believe httpd is
chrooted to /var/www, I do know that php exists under this tree in its
/usr/local/bin and the libphp5 file exists there where it should as
well, I believe.
I have also bumped up the php error reporting but I can't seem
to find much about it in the applicable logfiles (/var/log/messages,
/var/www/logs/error_log, etc).
Truncating the previous discussion as I'm assuming that you've
got logs of what's going on here.  Thank you for the help!



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Bryan, after doing that it appears that it's not even getting executed.
I put the script into a web accessible file called debug.php, loaded
it in my browser and saw a blank page.  Viewing the source is
showing the original ? phpinfo(); ?, leading me to believe that it is
not even handing it off to the appropriate script engine...  Not sure if
I'm right but does that help at all?



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
And, um, wrapping the snippet in the appropriate
html
 head/head
 body? phpinfo(); ?/body
/html
didn't seem to help matters at all, either.  :(



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Barry Grumbine
IIRC 4.9-5.0 was a little ugly, maybe you missed the PHP upgrade
instructions here:
http://www.openbsd.org/faq/upgrade50.html#Pkgup



On Wed, May 22, 2013 at 4:44 PM, Damon Getsman damo.g...@gmail.com wrote:

 Bryan, after doing that it appears that it's not even getting executed.
 I put the script into a web accessible file called debug.php, loaded
 it in my browser and saw a blank page.  Viewing the source is
 showing the original ? phpinfo(); ?, leading me to believe that it is
 not even handing it off to the appropriate script engine...  Not sure if
 I'm right but does that help at all?



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey

On 05/23/13 11:44, Damon Getsman wrote:

Bryan, after doing that it appears that it's not even getting executed.
I put the script into a web accessible file called debug.php, loaded
it in my browser and saw a blank page.  Viewing the source is
showing the original ? phpinfo(); ?, leading me to believe that it is
not even handing it off to the appropriate script engine...  Not sure if
I'm right but does that help at all?



You can't use shorttags* ...

You need to use ...

?php
?

* Well, you can if you tweak settings.



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Nope, I caught the PHP upgrade instructions and I believe they've been
carried out
correctly.  :(



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Damon Getsman
Okay, now I've got the phpinfo output.  Nothing is jumpin' out at me,
if y'all care to take a look at it I've got it available at
bismaninfo.hopto.org/debug.php for a limited time here.



Re: Problems w/apache+php+mysqld since 4.9-5.0 OpenBSD Upgrade

2013-05-22 Thread Richard Toohey

On 05/23/13 12:08, Damon Getsman wrote:

Okay, now I've got the phpinfo output.  Nothing is jumpin' out at me,
if y'all care to take a look at it I've got it available at
bismaninfo.hopto.org/debug.php for a limited time here.



No mysql in the output.

What does php -m give you, etc.

It's like the message you are getting - something is up with the mysql 
extension in your install.


Check the ini files, etc.

You are using the base Apache and PHP is working - you need to look at 
the mysql extension and find out why it is not enabled or not loading.




Re: Adding a route for chrooted Apache/PHP

2010-05-08 Thread Joachim Schipper
On Fri, May 07, 2010 at 11:23:12AM +0200, Alexander Farber wrote:
 (...) I have to send a HTTP GET
 request from one of my scripts to one host (to appsmail.ru).
 
 So I've added the file /var/www/etc/hosts:
 
   127.0.0.1   localhost
   94.100.188.5appsmail.ru www.appsmail.ru

Why did you hardcode the IP here, and then hardcode it below again? Let
the resolver do its job.

 And also have changed this line in /var/www/conf/php.ini:
 
   allow_url_fopen = On

You could avoid setting this dangerous option by installing and using
php5-curl.

 Unfortunately I still get the error:
 
 Warning: file_get_contents(http://94.100.188.5/robots.txt)
 [function.file-get-contents]: failed to open stream: No route to host
 in /htdocs/mailru/index.php on line 18
 
 This is because the default route (or at least the route to appsmail.ru)
 is unknown to the chrooted Apache. (Script works ok at the console).

Eh... the routing table is per-kernel, and does not need filesystem
access. No route to host is most likely a wrong error message; please
show the code.

I don't *think* this is the reason, but note that
http://94.100.188.5/robots.txt leads to a 404.

I'm sorry I don't have a solution - just trying to fix some
misunderstandings here.

Joachim



Re: Adding a route for chrooted Apache/PHP

2010-05-08 Thread Alexander Farber
Hello,

thanks for your replies. The reason for my PHP script failure

  Warning: file_get_contents(http://94.100.188.5/robots.txt)
 [function.file-get-contents]: failed to open stream: No route to host

have been 1) missing /var/www/etc/resolv.conf (the hosts I had already)
and 2) I forgot that I had an anti-PHP rule in pf.conf:

  # don't allow PHP-worms to propagate
  block out quick log on $ext_if proto { tcp, udp } all user www

After those changes (and the following lines in /var/www/conf/php.ini)

  allow_url_fopen = On
  # needed for phpBB's template editing:
  suhosin.post.max_value_length = 6500
  suhosin.request.max_value_length = 6500

my PHP script works fine under chrooted Apache again.

(Yes, the PHP's error message about route had been misleading :-)

Regards
Alex



Re: Adding a route for chrooted Apache/PHP

2010-05-08 Thread Stuart Henderson
On 2010-05-08, Alexander Farber alexander.far...@gmail.com wrote:
 (Yes, the PHP's error message about route had been misleading :-)

This (EHOSTUNREACH) is the usual error when something is blocked by PF.



Adding a route for chrooted Apache/PHP

2010-05-07 Thread Alexander Farber
Hello,

I'm a longtime happy user of OpenBSD + stock Apache +
PHP (from packages), but now I have to send a HTTP GET
request from one of my scripts to one host (to appsmail.ru).

So I've added the file /var/www/etc/hosts:

  127.0.0.1   localhost
  94.100.188.5appsmail.ru www.appsmail.ru

And also have changed this line in /var/www/conf/php.ini:

  allow_url_fopen = On

Unfortunately I still get the error:

Warning: file_get_contents(http://94.100.188.5/robots.txt)
[function.file-get-contents]: failed to open stream: No route to host
in /htdocs/mailru/index.php on line 18

This is because the default route (or at least the route to appsmail.ru)
is unknown to the chrooted Apache. (Script works ok at the console).

So my question is: how do you add a route to chrooted Apache?

I can't just copy /etc/mygate to /var/www/etc/mygate,
I need to exceute the commands similar to /etc/netstart's
from Apache (during its startup?) somehow

Thank you for any hints
Alex

PS: Currently using OpenBSD 4.5-stable and

php5-core-5.2.8p0   server-side HTML-embedded scripting language
php5-gd-5.2.8-no_x11 image manipulation extensions for php5
php5-pgsql-5.2.8pgsql database access extensions for php5



Re: Adding a route for chrooted Apache/PHP

2010-05-07 Thread Devin Ceartas

cp /etc/host /var/www/etc/hosts

?

Devin Ceartas
Owner, NacreData L.L.C.
PO Box 646
Chapel Hill, NC 27514
(919) 442-8899
de...@nacredata.com
AIM or Skype IM: nacredata
Facebook, Twitter: nacredata

On May 7, 2010, at 5:23 AM, Alexander Farber  
alexander.far...@gmail.com wrote:



Hello,

I'm a longtime happy user of OpenBSD + stock Apache +
PHP (from packages), but now I have to send a HTTP GET
request from one of my scripts to one host (to appsmail.ru).

So I've added the file /var/www/etc/hosts:

 127.0.0.1   localhost
 94.100.188.5appsmail.ru www.appsmail.ru

And also have changed this line in /var/www/conf/php.ini:

 allow_url_fopen = On

Unfortunately I still get the error:

Warning: file_get_contents(http://94.100.188.5/robots.txt)
[function.file-get-contents]: failed to open stream: No route to host
in /htdocs/mailru/index.php on line 18

This is because the default route (or at least the route to appsmail.ru 
)

is unknown to the chrooted Apache. (Script works ok at the console).

So my question is: how do you add a route to chrooted Apache?

I can't just copy /etc/mygate to /var/www/etc/mygate,
I need to exceute the commands similar to /etc/netstart's
from Apache (during its startup?) somehow

Thank you for any hints
Alex

PS: Currently using OpenBSD 4.5-stable and

php5-core-5.2.8p0   server-side HTML-embedded scripting language
php5-gd-5.2.8-no_x11 image manipulation extensions for php5
php5-pgsql-5.2.8pgsql database access extensions for php5




Re: Adding a route for chrooted Apache/PHP

2010-05-07 Thread Gilles Chehade
the problem is not about having a route added to the chroot but rather about
having the resolver (hint: there's a hint in what I just wrote) know how to do
its work.

Gilles

On Fri, May 07, 2010 at 09:06:47AM -0400, Devin Ceartas wrote:
 cp /etc/host /var/www/etc/hosts
 
 ?
 
 Devin Ceartas
 Owner, NacreData L.L.C.
 PO Box 646
 Chapel Hill, NC 27514
 (919) 442-8899
 de...@nacredata.com
 AIM or Skype IM: nacredata
 Facebook, Twitter: nacredata
 
 On May 7, 2010, at 5:23 AM, Alexander Farber  
 alexander.far...@gmail.com wrote:
 
 Hello,
 
 I'm a longtime happy user of OpenBSD + stock Apache +
 PHP (from packages), but now I have to send a HTTP GET
 request from one of my scripts to one host (to appsmail.ru).
 
 So I've added the file /var/www/etc/hosts:
 
  127.0.0.1   localhost
  94.100.188.5appsmail.ru www.appsmail.ru
 
 And also have changed this line in /var/www/conf/php.ini:
 
  allow_url_fopen = On
 
 Unfortunately I still get the error:
 
 Warning: file_get_contents(http://94.100.188.5/robots.txt)
 [function.file-get-contents]: failed to open stream: No route to host
 in /htdocs/mailru/index.php on line 18
 
 This is because the default route (or at least the route to appsmail.ru 
 )
 is unknown to the chrooted Apache. (Script works ok at the console).
 
 So my question is: how do you add a route to chrooted Apache?
 
 I can't just copy /etc/mygate to /var/www/etc/mygate,
 I need to exceute the commands similar to /etc/netstart's
 from Apache (during its startup?) somehow
 
 Thank you for any hints
 Alex
 
 PS: Currently using OpenBSD 4.5-stable and
 
 php5-core-5.2.8p0   server-side HTML-embedded scripting language
 php5-gd-5.2.8-no_x11 image manipulation extensions for php5
 php5-pgsql-5.2.8pgsql database access extensions for php5
 

-- 
Gilles Chehade
freelance developer/sysadmin/consultant

   http://www.poolp.org



Re: Adding a route for chrooted Apache/PHP

2010-05-07 Thread Helmut Schneider
Alexander Farber wrote:

 I'm a longtime happy user of OpenBSD + stock Apache +
 PHP (from packages), but now I have to send a HTTP GET
 request from one of my scripts to one host (to appsmail.ru).
 
 So I've added the file /var/www/etc/hosts:
 
   127.0.0.1   localhost
   94.100.188.5appsmail.ru www.appsmail.ru
 
 And also have changed this line in /var/www/conf/php.ini:
 
   allow_url_fopen = On
 
 Unfortunately I still get the error:
 
 Warning: file_get_contents(http://94.100.188.5/robots.txt)
 [function.file-get-contents]: failed to open stream: No route to host
 in /htdocs/mailru/index.php on line 18

Apache is chroot'ed but not jailed (the process is restricted only
within the file system). I guess there are missing php modules within
the chroot. What is line 18?

Helmut

-- 
No Swen today, my love has gone away
My mailbox stands for lorn, a symbol of the dawn



Re: Adding a route for chrooted Apache/PHP

2010-05-07 Thread Gilles Chehade
Sorry i misread the error message

Gilles

On Fri, May 07, 2010 at 03:17:29PM +0200, Gilles Chehade wrote:
 the problem is not about having a route added to the chroot but rather about
 having the resolver (hint: there's a hint in what I just wrote) know how to do
 its work.
 
 Gilles
 
 On Fri, May 07, 2010 at 09:06:47AM -0400, Devin Ceartas wrote:
  cp /etc/host /var/www/etc/hosts
  
  ?
  
  Devin Ceartas
  Owner, NacreData L.L.C.
  PO Box 646
  Chapel Hill, NC 27514
  (919) 442-8899
  de...@nacredata.com
  AIM or Skype IM: nacredata
  Facebook, Twitter: nacredata
  
  On May 7, 2010, at 5:23 AM, Alexander Farber  
  alexander.far...@gmail.com wrote:
  
  Hello,
  
  I'm a longtime happy user of OpenBSD + stock Apache +
  PHP (from packages), but now I have to send a HTTP GET
  request from one of my scripts to one host (to appsmail.ru).
  
  So I've added the file /var/www/etc/hosts:
  
   127.0.0.1   localhost
   94.100.188.5appsmail.ru www.appsmail.ru
  
  And also have changed this line in /var/www/conf/php.ini:
  
   allow_url_fopen = On
  
  Unfortunately I still get the error:
  
  Warning: file_get_contents(http://94.100.188.5/robots.txt)
  [function.file-get-contents]: failed to open stream: No route to host
  in /htdocs/mailru/index.php on line 18
  
  This is because the default route (or at least the route to appsmail.ru 
  )
  is unknown to the chrooted Apache. (Script works ok at the console).
  
  So my question is: how do you add a route to chrooted Apache?
  
  I can't just copy /etc/mygate to /var/www/etc/mygate,
  I need to exceute the commands similar to /etc/netstart's
  from Apache (during its startup?) somehow
  
  Thank you for any hints
  Alex
  
  PS: Currently using OpenBSD 4.5-stable and
  
  php5-core-5.2.8p0   server-side HTML-embedded scripting language
  php5-gd-5.2.8-no_x11 image manipulation extensions for php5
  php5-pgsql-5.2.8pgsql database access extensions for php5
  
 
 -- 
 Gilles Chehade
 freelance developer/sysadmin/consultant
 
  http://www.poolp.org
 

-- 
Gilles Chehade
freelance developer/sysadmin/consultant

   http://www.poolp.org



Re: Adding a route for chrooted Apache/PHP

2010-05-07 Thread Helmut Schneider
Gilles Chehade wrote:

 the problem is not about having a route added to the chroot but
 rather about having the resolver (hint: there's a hint in what I just
 wrote) know how to do its work.

   So I've added the file /var/www/etc/hosts:
   
   127.0.0.1   localhost
   94.100.188.5appsmail.ru www.appsmail.ru
   
   And also have changed this line in /var/www/conf/php.ini:
   
   allow_url_fopen = On
   
   Unfortunately I still get the error:
   
   Warning: file_get_contents(http://94.100.188.5/robots.txt)

So either the OP configured his script to use the IP rather than the
host name or apache resolves fine. In both cases the problem seems not
the resolver. Or did I miss something?

Helmut

-- 
No Swen today, my love has gone away
My mailbox stands for lorn, a symbol of the dawn



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-04 Thread Vijay Sankar

Robert wrote:

On Wed, 03 Mar 2010 17:37:23 -0600
Vijay Sankar vsan...@foretell.ca wrote:

I have problems running Horde on 4.7 -beta i386. The /var/www/tmp 
directory gets filled with sess_ files and there is no output on any

of the frames.


4.7-beta is not very precise, date of snapshot build or cvs
checkoutwould help.
There has been an ABI change for apache.


I am using the following packages

php5-core-5.2.12server-side HTML-embedded scripting language


Because of the changes to apache, you need recompiled packages/modules.
The php5 port is at p1.

So my guess is that that's the problem you are hitting.
i386 packages on ftp.openbsd.org are dated 1st of march, those should
be new enough to work with -current apache. (Check if your mirror has
that package build.)

- Robert



Thanks very much. I had built the kernel and binaries on the weekend

kern.version=
OpenBSD 4.7-beta (GENERIC.MP) #7: Sat Feb 27 16:28:09 CST 2010 
r...@i386.sankars.local:/usr/src/sys/arch/i386/compile/GENERIC.MP


from CVS checkout at 2:30PM CST that day.

In /var/www/logs/access_log, I get

10.0.0.111 - - [03/Mar/2010:21:51:46 -0600] GET 
/horde/login.php?url=%2Fpost%2Fservices%2Fportal%2Fsi 

debar.phpnosidebar=1horde_logout_token=NtFW8jojbT7M0QYrK5BxOsfqqTAapp=horde 
HTTP/1.1 200 363


when trying to set up horde (the logout_token is different in each log 
entry) and there are lots of sess_ files.


Just in case I had made mistakes building binaries or had screwed up 
somehow, I did the following. I set up a VM guest (qemu running on my 
OpenBSD 4.6 -stable desktop), downloaded install47.iso, php5-core, 
postgresql-server, horde, etc., from i386 snapshots last night (from 
ftp.ca.openbsd.org and had the same results. Not sure whether a new 
physical machine to repeat the test is the right way to go.


There are no errors in error_log, ssl_engine_log, and ssl_request_log. I 
tried configuration with http as well as https (self-signed cert)


So I am not sure what is the right step to take to get Horde working.

Thanks again,

Vijay

--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-04 Thread Vijay Sankar

Vijay Sankar wrote:

Robert wrote:

On Wed, 03 Mar 2010 17:37:23 -0600
Vijay Sankar vsan...@foretell.ca wrote:

I have problems running Horde on 4.7 -beta i386. The /var/www/tmp 
directory gets filled with sess_ files and there is no output on any

of the frames.


4.7-beta is not very precise, date of snapshot build or cvs
checkoutwould help.
There has been an ABI change for apache.


I am using the following packages

php5-core-5.2.12server-side HTML-embedded scripting language


Because of the changes to apache, you need recompiled packages/modules.
The php5 port is at p1.

So my guess is that that's the problem you are hitting.
i386 packages on ftp.openbsd.org are dated 1st of march, those should
be new enough to work with -current apache. (Check if your mirror has
that package build.)

- Robert



Thanks very much. I had built the kernel and binaries on the weekend

kern.version=
OpenBSD 4.7-beta (GENERIC.MP) #7: Sat Feb 27 16:28:09 CST 2010 
r...@i386.sankars.local:/usr/src/sys/arch/i386/compile/GENERIC.MP


from CVS checkout at 2:30PM CST that day.

In /var/www/logs/access_log, I get

10.0.0.111 - - [03/Mar/2010:21:51:46 -0600] GET 
/horde/login.php?url=%2Fpost%2Fservices%2Fportal%2Fsi
debar.phpnosidebar=1horde_logout_token=NtFW8jojbT7M0QYrK5BxOsfqqTAapp=horde 
HTTP/1.1 200 363


when trying to set up horde (the logout_token is different in each log 
entry) and there are lots of sess_ files.


Just in case I had made mistakes building binaries or had screwed up 
somehow, I did the following. I set up a VM guest (qemu running on my 
OpenBSD 4.6 -stable desktop), downloaded install47.iso, php5-core, 
postgresql-server, horde, etc., from i386 snapshots last night (from 
ftp.ca.openbsd.org and had the same results. Not sure whether a new 
physical machine to repeat the test is the right way to go.


There are no errors in error_log, ssl_engine_log, and ssl_request_log. I 
tried configuration with http as well as https (self-signed cert)


So I am not sure what is the right step to take to get Horde working.

Thanks again,

Vijay



Just for the archives -- in case anyone else searches the archives and 
thinks there are any issues or problems. Quick answer is that there are 
no problems with 4.7 -beta as of March 3 2010 and php5 as far as horde 
is concerned.


I tested this again and again and finally figured out that the fault was 
entirely mine. Unfortunately I have no excuse. There are no problems 
with php5 packages or with OpenBSD httpd or horde and related packages 
or anything related to OpenBSD. It looks like I had copied configuration 
files from a production server and they had the wrong cookie path. This 
resulted in the errors I mentioned in earlier email messages on this thread.


Thanks again to all the developers and OpenBSD Gurus who tried to help 
through the list as well as through private messages.


Sorry for the noise.

--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-03 Thread Vijay Sankar

Duncan Patton a Campbell wrote:

On Sun, 28 Feb 2010 15:01:20 + (UTC)
Stuart Henderson s...@spacehopper.org wrote:


On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:

On Thu, 25 Feb 2010 08:58:30 -0500
Dan Harnett dan...@harnett.name wrote:


On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
I've just installed a server using current and have found that 
there are problems with session_destroy(); such that is just 
does not work.  

The Apache is the installed (1.3) version and PHP is from 
packages.


I have tested the same software and setup on a 4.5 Release 
(no patches) and there are no problems with sessions.  


Can you provide any more detail?  session_destroy() appears to work fine
with the i386 snap dated 2/23/2010 and latest php5-core snapshot
package.


I mebbe spoke to soon to be conclusive... as of now I am still looking
under rocks... the problem exhibits on a clean 4.5-Release install but
not on my (semi stock) 4.5 development box.

sessions were broken in PHP in 4.5 release, you need to compile
from -stable ports (or move to -current after the next package
snapshot for your arch has been built).



How wide is this problem?  I started out with a 4.6 current, which didn't work,
then 4.5 release... sessions are a fairly important php feature.  What has
me bugged here is that I have a 4.5 system that works fine, but it is not
just release, and has had apache2.2 installed on it (my devsys...) and runable.

Thanks for any help.

Dhu



On 4.6 amd64 -current

kern.version=
OpenBSD 4.6-current (GENERIC.MP) #0: Wed Nov 25 17:27:29 CST 2009 
r...@amd64.sankars.local:/usr/src/sys/arch/amd64/compile/GENERIC.MP


PHP sessions worked fine. I am able to run Horde with postgresql DB and 
OpenBSD httpd on that system.


I have problems running Horde on 4.7 -beta i386. The /var/www/tmp 
directory gets filled with sess_ files and there is no output on any of 
the frames.


I am using the following packages

php5-core-5.2.12server-side HTML-embedded scripting language
php5-gd-5.2.12  image manipulation extensions for php5
php5-imap-5.2.12imap, pop3 and nntp extensions for php5
php5-ldap-5.2.12ldap protocol extensions for php5
php5-mbstring-5.2.12 multibyte characters extensions for php5
php5-mcrypt-5.2.12  mcrypt encryption/decryption extensions for php5
php5-mhash-5.2.12   mhash extensions for php5
php5-pgsql-5.2.12   pgsql database access extensions for php5
php5-tidy-5.2.12tidy HTML cleaner bindings

Please let me know if there is any tests that I can help with.

Thanks,

Vijay





--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-03 Thread Robert
On Wed, 03 Mar 2010 17:37:23 -0600
Vijay Sankar vsan...@foretell.ca wrote:

 I have problems running Horde on 4.7 -beta i386. The /var/www/tmp 
 directory gets filled with sess_ files and there is no output on any
 of the frames.

4.7-beta is not very precise, date of snapshot build or cvs
checkoutwould help.
There has been an ABI change for apache.

 
 I am using the following packages
 
 php5-core-5.2.12server-side HTML-embedded scripting language

Because of the changes to apache, you need recompiled packages/modules.
The php5 port is at p1.

So my guess is that that's the problem you are hitting.
i386 packages on ftp.openbsd.org are dated 1st of march, those should
be new enough to work with -current apache. (Check if your mirror has
that package build.)

- Robert



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-01 Thread Duncan Patton a Campbell
On Sun, 28 Feb 2010 15:01:20 + (UTC)
Stuart Henderson s...@spacehopper.org wrote:

 On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:
  On Thu, 25 Feb 2010 08:58:30 -0500
  Dan Harnett dan...@harnett.name wrote:
 
  On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
   I've just installed a server using current and have found that 
   there are problems with session_destroy(); such that is just 
   does not work.  
   
   The Apache is the installed (1.3) version and PHP is from 
   packages.
   
   I have tested the same software and setup on a 4.5 Release 
   (no patches) and there are no problems with sessions.  
  
  
  Can you provide any more detail?  session_destroy() appears to work fine
  with the i386 snap dated 2/23/2010 and latest php5-core snapshot
  package.
  
 
  I mebbe spoke to soon to be conclusive... as of now I am still looking
  under rocks... the problem exhibits on a clean 4.5-Release install but
  not on my (semi stock) 4.5 development box.
 
 sessions were broken in PHP in 4.5 release, you need to compile
 from -stable ports (or move to -current after the next package
 snapshot for your arch has been built).
 

I pulled the 4.5 stable ports and  no change...  given what Chris Bennett
said previously I think the problem is in apache not the php package.  Just
the same I'm going to pull the ports from current and build that before 
I go about trying to rebuild the distribution apache 1.3 (not in ports..)

Dhu



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-01 Thread Duncan Patton a Campbell
On Sun, 28 Feb 2010 15:01:20 + (UTC)
Stuart Henderson s...@spacehopper.org wrote:

 On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:
  On Thu, 25 Feb 2010 08:58:30 -0500
  Dan Harnett dan...@harnett.name wrote:
 
  On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
   I've just installed a server using current and have found that 
   there are problems with session_destroy(); such that is just 
   does not work.  
   
   The Apache is the installed (1.3) version and PHP is from 
   packages.
   
   I have tested the same software and setup on a 4.5 Release 
   (no patches) and there are no problems with sessions.  
  
  
  Can you provide any more detail?  session_destroy() appears to work fine
  with the i386 snap dated 2/23/2010 and latest php5-core snapshot
  package.
  
 
  I mebbe spoke to soon to be conclusive... as of now I am still looking
  under rocks... the problem exhibits on a clean 4.5-Release install but
  not on my (semi stock) 4.5 development box.
 
 sessions were broken in PHP in 4.5 release, you need to compile
 from -stable ports (or move to -current after the next package
 snapshot for your arch has been built).
 

How wide is this problem?  I started out with a 4.6 current, which didn't work,
then 4.5 release... sessions are a fairly important php feature.  What has
me bugged here is that I have a 4.5 system that works fine, but it is not
just release, and has had apache2.2 installed on it (my devsys...) and runable.

Thanks for any help.

Dhu



Re: FWIW Current snapshot Apache/PHP buggy

2010-03-01 Thread Stuart Henderson
On 2010/03/01 03:48, Duncan Patton a Campbell wrote:
 On Sun, 28 Feb 2010 15:01:20 + (UTC)
 Stuart Henderson s...@spacehopper.org wrote:
 
  On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:
   On Thu, 25 Feb 2010 08:58:30 -0500
   Dan Harnett dan...@harnett.name wrote:
  
   On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
I've just installed a server using current and have found that 
there are problems with session_destroy(); such that is just 
does not work.  

The Apache is the installed (1.3) version and PHP is from 
packages.

I have tested the same software and setup on a 4.5 Release 
(no patches) and there are no problems with sessions.  
   
   
   Can you provide any more detail?  session_destroy() appears to work fine
   with the i386 snap dated 2/23/2010 and latest php5-core snapshot
   package.
   
  
   I mebbe spoke to soon to be conclusive... as of now I am still looking
   under rocks... the problem exhibits on a clean 4.5-Release install but
   not on my (semi stock) 4.5 development box.
  
  sessions were broken in PHP in 4.5 release, you need to compile
  from -stable ports (or move to -current after the next package
  snapshot for your arch has been built).
  
 
 How wide is this problem?  I started out with a 4.6 current, which didn't 
 work,
 then 4.5 release... sessions are a fairly important php feature.  What has
 me bugged here is that I have a 4.5 system that works fine, but it is not
 just release, and has had apache2.2 installed on it (my devsys...) and 
 runable.

oh hmm, I was confused between releases, 4.6 had broken php, not 4.5.
(search the list archives for php segfault for more details).



Re: FWIW Current snapshot Apache/PHP buggy

2010-02-28 Thread Stuart Henderson
On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:
 On Thu, 25 Feb 2010 08:58:30 -0500
 Dan Harnett dan...@harnett.name wrote:

 On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
  I've just installed a server using current and have found that 
  there are problems with session_destroy(); such that is just 
  does not work.  
  
  The Apache is the installed (1.3) version and PHP is from 
  packages.
  
  I have tested the same software and setup on a 4.5 Release 
  (no patches) and there are no problems with sessions.  
 
 
 Can you provide any more detail?  session_destroy() appears to work fine
 with the i386 snap dated 2/23/2010 and latest php5-core snapshot
 package.
 

 I mebbe spoke to soon to be conclusive... as of now I am still looking
 under rocks... the problem exhibits on a clean 4.5-Release install but
 not on my (semi stock) 4.5 development box.

sessions were broken in PHP in 4.5 release, you need to compile
from -stable ports (or move to -current after the next package
snapshot for your arch has been built).



Re: FWIW Current snapshot Apache/PHP buggy

2010-02-28 Thread Duncan Patton a Campbell
On Sun, 28 Feb 2010 15:01:20 + (UTC)
Stuart Henderson s...@spacehopper.org wrote:

 On 2010-02-27, Duncan Patton a Campbell campb...@neotext.ca wrote:
  On Thu, 25 Feb 2010 08:58:30 -0500
  Dan Harnett dan...@harnett.name wrote:
 
  On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
   I've just installed a server using current and have found that 
   there are problems with session_destroy(); such that is just 
   does not work.  
   
   The Apache is the installed (1.3) version and PHP is from 
   packages.
   
   I have tested the same software and setup on a 4.5 Release 
   (no patches) and there are no problems with sessions.  
  
  
  Can you provide any more detail?  session_destroy() appears to work fine
  with the i386 snap dated 2/23/2010 and latest php5-core snapshot
  package.
  
 
  I mebbe spoke to soon to be conclusive... as of now I am still looking
  under rocks... the problem exhibits on a clean 4.5-Release install but
  not on my (semi stock) 4.5 development box.
 
 sessions were broken in PHP in 4.5 release, you need to compile
 from -stable ports (or move to -current after the next package
 snapshot for your arch has been built).
 

Thanks.  That makes sense.  The (semi-stock) system that it isn't broken on has
extentsive rebuilds from ports of apache* versions 1.3, 2.0 and 2.2.

Dhu



Re: FWIW Current snapshot Apache/PHP buggy

2010-02-27 Thread Duncan Patton a Campbell
On Thu, 25 Feb 2010 08:58:30 -0500
Dan Harnett dan...@harnett.name wrote:

 On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
  I've just installed a server using current and have found that 
  there are problems with session_destroy(); such that is just 
  does not work.  
  
  The Apache is the installed (1.3) version and PHP is from 
  packages.
  
  I have tested the same software and setup on a 4.5 Release 
  (no patches) and there are no problems with sessions.  
 
 
 Can you provide any more detail?  session_destroy() appears to work fine
 with the i386 snap dated 2/23/2010 and latest php5-core snapshot
 package.
 

I mebbe spoke to soon to be conclusive... as of now I am still looking
under rocks... the problem exhibits on a clean 4.5-Release install but
not on my (semi stock) 4.5 development box.

Dhu



Re: FWIW Current snapshot Apache/PHP buggy

2010-02-27 Thread Chris Bennett

Duncan Patton a Campbell wrote:
I've just installed a server using current and have found that 
there are problems with session_destroy(); such that is just 
does not work.  

The Apache is the installed (1.3) version and PHP is from 
packages.


I have tested the same software and setup on a 4.5 Release 
(no patches) and there are no problems with sessions.  


Dhu


  
If you have the very latest apache, you will need to rebuild apache 
modules from ports, not packages.

(at some point packages will be updated if not already)

The trick that made all clear for me was:

check 'ls -l /usr/lib/apache/modules', the following are from base:

-r--r--r--  1 root  bin  114973 Feb 25 22:54 libproxy.so
-r--r--r--  1 root  bin7736 Feb 25 22:54 mod_auth_anon.so
-r--r--r--  1 root  bin7847 Feb 25 22:54 mod_auth_db.so
-r--r--r--  1 root  bin   12046 Feb 25 22:54 mod_auth_dbm.so
-r--r--r--  1 root  bin   25865 Feb 25 22:54 mod_auth_digest.so
-r--r--r--  1 root  bin   12005 Feb 25 22:54 mod_cern_meta.so
-r--r--r--  1 root  bin   11862 Feb 25 22:54 mod_define.so
-r--r--r--  1 root  bin   12196 Feb 25 22:54 mod_digest.so
-r--r--r--  1 root  bin   12197 Feb 25 22:54 mod_expires.so
-r--r--r--  1 root  bin7357 Feb 25 22:54 mod_headers.so
-r--r--r--  1 root  bin   20276 Feb 25 22:54 mod_info.so
-r--r--r--  1 root  bin7357 Feb 25 22:54 mod_log_agent.so
-r--r--r--  1 root  bin7594 Feb 25 22:54 mod_log_referer.so
-r--r--r--  1 root  bin   24150 Feb 25 22:54 mod_mime_magic.so
-r--r--r--  1 root  bin   12251 Feb 25 22:54 mod_mmap_static.so
-r--r--r--  1 root  bin   57862 Feb 25 22:54 mod_rewrite.so
-r--r--r--  1 root  bin   12656 Feb 25 22:54 mod_speling.so
-r--r--r--  1 root  bin   11827 Feb 25 22:54 mod_unique_id.so
-r--r--r--  1 root  bin   13283 Feb 25 22:54 mod_usertrack.so
-r--r--r--  1 root  bin   12005 Feb 25 22:54 mod_vhost_alias.so

any others will be from packages, make sure they are dated from
after you rebuilt/reinstalled things.

I had trouble getting rid of an old mod_gzip.so
I had to work hard deleting *.tgz's from the four places they pop up

Thanks to Stuart Henderson for that tip

--
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
  -- Robert Heinlein



FWIW Current snapshot Apache/PHP buggy

2010-02-25 Thread Duncan Patton a Campbell
I've just installed a server using current and have found that 
there are problems with session_destroy(); such that is just 
does not work.  

The Apache is the installed (1.3) version and PHP is from 
packages.

I have tested the same software and setup on a 4.5 Release 
(no patches) and there are no problems with sessions.  

Dhu



Re: FWIW Current snapshot Apache/PHP buggy

2010-02-25 Thread Dan Harnett
On Thu, Feb 25, 2010 at 03:30:47AM -0700, Duncan Patton a Campbell wrote:
 I've just installed a server using current and have found that 
 there are problems with session_destroy(); such that is just 
 does not work.  
 
 The Apache is the installed (1.3) version and PHP is from 
 packages.
 
 I have tested the same software and setup on a 4.5 Release 
 (no patches) and there are no problems with sessions.  


Can you provide any more detail?  session_destroy() appears to work fine
with the i386 snap dated 2/23/2010 and latest php5-core snapshot
package.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 7:08 PM, Richard Toohey wrote:


On 16/06/2009, at 3:22 PM, MANI wrote:

# cd /var/www/conf
# vi index.php

  1html
  2  headPHP Test Page!/head
  3  body
  4 Hello PHP!
  5  /body
  6 /html


[cut]
browsing to http://127.0.0.1/index.html shows *It Worked!* default  
page.


browsing to http://127.0.0.1/index.php will shows a blank page,  
when I view

source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal  
Segmentation

fault (11)

[cut]

Just a few (probably dumb) questions ...

[1] the index.php is really in /var/www/conf?
[2] you meant the index.php not to be valid PHP?  No ?php [code] ? 
 on purpose?

[3] the segfault is what the issue is?  Or the blank page?

Thanks.

Hmm, number 3 was a dumb question, but I was thinking
down the lines of number 1 and number 2 - what are you
actually trying to do?

Having the html page go through the PHP engine does this
on stock i386 4.5 (so no segfault or blank page):

 PHP Test Page! Hello PHP!

[4] What happens if you try

php index.php

(i.e. from the command line.  Can you get anything to do with
PHP working - outside Apache first)

[5] What happens if you disable the mysql extension - just get php
core working first?

[6] Anything from php -v or php -m that gives any clues?

[7] Did you really mean to install php5-mysql and mysql-SERVER?
You might have meant mysql-CLIENT - makes more sense.

Hopefully a few clues from that.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 3:22 PM, MANI wrote:

# cd /var/www/conf
# vi index.php

  1html
  2  headPHP Test Page!/head
  3  body
  4 Hello PHP!
  5  /body
  6 /html


[cut]
browsing to http://127.0.0.1/index.html shows *It Worked!* default  
page.


browsing to http://127.0.0.1/index.php will shows a blank page,  
when I view

source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal  
Segmentation

fault (11)

[cut]

Just a few (probably dumb) questions ...

[1] the index.php is really in /var/www/conf?
[2] you meant the index.php not to be valid PHP?  No ?php [code] ?  
on purpose?

[3] the segfault is what the issue is?  Or the blank page?

Thanks.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 7:44 PM, Richard Toohey wrote:

[7] Did you really mean to install php5-mysql and mysql-SERVER?
You might have meant mysql-CLIENT - makes more sense.

D'oh!   More sending without thinking first - installing php5-mysql
should have pulled in mysql-CLIENT automatically.

That's enough from me.



Re: Apache php weird problem

2009-06-16 Thread MANI
First of all thanks for the clues.

On 6/16/09, Richard Toohey richardtoo...@paradise.net.nz wrote:
 On 16/06/2009, at 7:08 PM, Richard Toohey wrote:

 [1] the index.php is really in /var/www/conf?

   No, it was another typo in mail, It's in /var/www/htdocs.

 [2] you meant the index.php not to be valid PHP?  No ?php [code] ?
  on purpose?

   Actually at first it was pure php but I changed it for testing purposes, Now:

$ cat /var/www/htdocs/index.php

!doctype html public -//W3C//DTD HTML 3.2 Final//EN
html
head
 titleAgent47 Test Page for Apache Installation/title
/head
  body bgcolor=#ff  
?php echo(Hello PHP!) ?
  /body
/html

 [4] What happens if you try

 php index.php

$php /var/www/htdocs/index.php

!doctype html public -//W3C//DTD HTML 3.2 Final//EN
html
head
 titleAgent47 Test Page for Apache Installation/title
/head
  body bgcolor=#ff
Hello PHP!  /body
/html


 [5] What happens if you disable the mysql extension - just get php
 core working first?

I removed mysql extension but no luck ... :(

 [6] Anything from php -v or php -m that gives any clues?

$ php -v

PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) (built: Mar  1 2009 15:20:21)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH

$ php -m
[PHP Modules]
bcmath
calendar
ctype
date
dom
exif
filter
ftp
gettext
hash
iconv
json
libxml
mysqli
openssl
pcre
PDO
posix
Reflection
session
SimpleXML
sockets
SPL
standard
suhosin
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
Suhosin

 [7] Did you really mean to install php5-mysql and mysql-SERVER?
 You might have meant mysql-CLIENT - makes more sense.

No, I also needed mysql-server.



Re: Apache php weird problem

2009-06-16 Thread Joachim Schipper
On Tue, Jun 16, 2009 at 02:07:33PM +0430, MANI wrote:
 First of all thanks for the clues.

Are you, perchance, running -current? The http ABI was changed
(http://www.openbsd.org/faq/current.html#20090603), and you appear to be
running a port from -stable. (Which is not guaranteed to work, and
doesn't, in this case.)

You didn't post a dmesg and may not be running a kernel compiled by the
project, so I wasn't able to figure out whether you were running
-current.

For what it's worth, my Apache/PHP install works fine...

Joachim



Re: Apache php weird problem

2009-06-16 Thread MANI
No, my httpd.conf file configured with AddType and LoadModule for php
correctly, and I don't get source code in browser, I just get a blank
page and a segmentation fault in error_log.

I tried to browse index.php with lynx instead of firefox, lynx
returned following error:

Looking up 127.0.0.1
Making HTTP connection to 127.0.0.1
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://127.0.0.1/index.php'
Alert!: Unable to access document.
lynx: Can't access startfile

but lynx shows http://127.0.0.1/index.html without any error.

On 6/16/09, Richard Toohey richardtoo...@paradise.net.nz wrote:
 And not this?

 http://marc.info/?l=openbsd-miscm=123972169917551w=3
 http://marc.info/?l=openbsd-miscm=123972131216791w=3

 (Not replying to the list to cut down the noise.)

 On 16/06/2009, at 9:37 PM, MANI wrote:

 First of all thanks for the clues.

 On 6/16/09, Richard Toohey richardtoo...@paradise.net.nz wrote:
 On 16/06/2009, at 7:08 PM, Richard Toohey wrote:

 [1] the index.php is really in /var/www/conf?

No, it was another typo in mail, It's in /var/www/htdocs.

 [2] you meant the index.php not to be valid PHP?  No ?php [code] ?
 on purpose?

Actually at first it was pure php but I changed it for testing
 purposes, Now:

 $ cat /var/www/htdocs/index.php

 !doctype html public -//W3C//DTD HTML 3.2 Final//EN
 html
 head
  titleAgent47 Test Page for Apache Installation/title
 /head
   body bgcolor=#ff   
  ?php echo(Hello PHP!) ?
   /body
 /html

 [4] What happens if you try

 php index.php

 $php /var/www/htdocs/index.php

 !doctype html public -//W3C//DTD HTML 3.2 Final//EN
 html
 head
  titleAgent47 Test Page for Apache Installation/title
 /head
   body bgcolor=#ff
 Hello PHP!  /body
 /html


 [5] What happens if you disable the mysql extension - just get php
 core working first?

 I removed mysql extension but no luck ... :(

 [6] Anything from php -v or php -m that gives any clues?

 $ php -v

 PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) (built: Mar  1 2009
 15:20:21)
 Copyright (c) 1997-2008 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
 with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH

 $ php -m
 [PHP Modules]
 bcmath
 calendar
 ctype
 date
 dom
 exif
 filter
 ftp
 gettext
 hash
 iconv
 json
 libxml
 mysqli
 openssl
 pcre
 PDO
 posix
 Reflection
 session
 SimpleXML
 sockets
 SPL
 standard
 suhosin
 sysvsem
 sysvshm
 tokenizer
 wddx
 xml
 xmlreader
 xmlwriter
 zlib

 [Zend Modules]
 Suhosin

 [7] Did you really mean to install php5-mysql and mysql-SERVER?
 You might have meant mysql-CLIENT - makes more sense.

 No, I also needed mysql-server.



Re: Apache php weird problem

2009-06-16 Thread MANI
 0: MATSHITA, DVD-RAM UJ-850S, 1.60 ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
pciide1 at pci0 dev 31 function 2 Intel 82801GBM SATA rev 0x02: DMA,
channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 19 (irq 10) for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: TOSHIBA MK1637GSX
wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 Intel 82801GB SMBus rev 0x02: apic
1 int 19 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 512MB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 Intel UHCI root hub rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
softraid0 at root
root on wd0a swap on wd0b dump on wd0b


On 6/16/09, Joachim Schipper joac...@joachimschipper.nl wrote:
 On Tue, Jun 16, 2009 at 02:07:33PM +0430, MANI wrote:
 First of all thanks for the clues.

 Are you, perchance, running -current? The http ABI was changed
 (http://www.openbsd.org/faq/current.html#20090603), and you appear to be
 running a port from -stable. (Which is not guaranteed to work, and
 doesn't, in this case.)

 You didn't post a dmesg and may not be running a kernel compiled by the
 project, so I wasn't able to figure out whether you were running
 -current.

 For what it's worth, my Apache/PHP install works fine...

   Joachim



Re: Apache php weird problem

2009-06-16 Thread Joachim Schipper
On Tue, Jun 16, 2009 at 03:07:01PM +0430, MANI wrote:
 yes! I'm running -current ( snapshot June 6 ). sorry I didn't saw
 2009/06/03 httpd ABI change, So I should build php from port tree?

Or use a -current package. I don't know what architecture you are on,
but ftp.openbsd.org has php5-core-5.2.9p2 for e.g. i386 and amd64.

It looks like you pointed your PKG_PATH at the wrong place. It should be
ftp://your.mirror.here/pub/OpenBSD/snapshots/packages/`machine`.

Joachim



Re: Apache php weird problem

2009-06-16 Thread MANI
thanks a lot joachim, that did the trick.

On 6/16/09, Joachim Schipper joac...@joachimschipper.nl wrote:
 On Tue, Jun 16, 2009 at 03:07:01PM +0430, MANI wrote:
 yes! I'm running -current ( snapshot June 6 ). sorry I didn't saw
 2009/06/03 httpd ABI change, So I should build php from port tree?

 Or use a -current package. I don't know what architecture you are on,
 but ftp.openbsd.org has php5-core-5.2.9p2 for e.g. i386 and amd64.

 It looks like you pointed your PKG_PATH at the wrong place. It should be
 ftp://your.mirror.here/pub/OpenBSD/snapshots/packages/`machine`.

   Joachim



Apache php weird problem

2009-06-15 Thread MANI
Hi misc,

#uname -a

OpenBSD agent47.bsd.org 4.5 GENERIC.MP#45 i386

# pkg_add -v php5-core
# pkg_add -v mysql-server-5.0.77
# pkg_add -v php5-mysqli-5.2.8

in /var/www/conf/httpd.conf :  *Include /var/www/conf/modules/*.conf*

in /var/www/conf/modules/php5.conf - /var/www/conf/modules.sample/php5.conf
:
*LoadModule php5_module /usr/local/lib/php/libphp5.so*
*AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php*

in /var/www/conf/php5 :  mysqli.ini - /var/www/conf/php5.sample/mysqli.ini
also default php.ini in /var/www/conf exists.


# cd /var/www/conf
# vi index.php

  1html
  2  headPHP Test Page!/head
  3  body
  4 Hello PHP!
  5  /body
  6 /html

# apachectl stop
# tail -f /var/www/logs 
# apachectl start
#
  3  body
  4 Hello PHP!
  5  /body
  6 /html

# apachectl stop
# tail -f /var/www/logs 
# apachectl start
# [Tue Jun 16 07:42:38 2009] [notice] Initializing etag from
/var/www/logs/etag-state
[Tue Jun 16 07:42:38 2009] [notice] chrooted in /var/www
[Tue Jun 16 07:42:38 2009] [notice] changed to uid 67, gid 67
[Tue Jun 16 07:42:38 2009] [notice] Apache configured -- resuming normal
operations
[Tue Jun 16 07:42:38 2009] [notice] Accept mutex: sysvsem (Default: sysvsem)

browsing to http://127.0.0.1/index.html shows *It Worked!* default page.

browsing to http://127.0.0.1/index.php will shows a blank page, when I view
source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal Segmentation
fault (11)

I also tried to LoadModule directly into httpd.conf without using any
Include file but no luck, also started apache in a non-chrooted environment
will not help.
File permission are also ok in htdocs: -r--r--r-- root bin index.php
Any Idea?



Re: Apache php weird problem

2009-06-15 Thread MANI
On Tue, Jun 16, 2009 at 7:52 AM, MANI mm.m...@gmail.com wrote:

 # apachectl stop
 # tail -f /var/www/logs 
 # apachectl start
 #
   3  body
   4 Hello PHP!
   5  /body
   6 /html

 # apachectl stop
 # tail -f /var/www/logs 
 # apachectl start



Sorry mistype I mean:

# apachectl stop
# tail -f /var/www/logs/error_log 
# apachectl start



Installing Apache PHP/Mysql support

2009-04-14 Thread Jean-Francois
Hi All,

I don't want to bother you with that matter.

Could one tell me where clear up to date infos are available regarding how to 
mount the PHP support for my website hosted on OpenBSD machine.

Actually web infos are just small how to which do not give any more 
informations. Further some tell you that the difficulty comes from the chroot 
wichi you might disable, which is not at all what I want to do.

Now I saw there are many packages php5 and mysql, however it's not clear for 
me which ones to install and the conf files that need to be modified, the 
chrooted directories where some files might be copied to  etc ...

Just link where info are available should help me.

Thanks for support.
JF



Re: Installing Apache PHP/Mysql support

2009-04-14 Thread Robert
On Tue, 14 Apr 2009 11:40:59 +0200
Jean-Francois jfsimon1...@gmail.com wrote:

 Hi All,
 
 I don't want to bother you with that matter.
 
 Could one tell me where clear up to date infos are available
 regarding how to mount the PHP support for my website hosted on
 OpenBSD machine.
 
 Actually web infos are just small how to which do not give any more 
 informations. Further some tell you that the difficulty comes from
 the chroot wichi you might disable, which is not at all what I want
 to do.
 
 Now I saw there are many packages php5 and mysql, however it's not
 clear for me which ones to install and the conf files that need to be
 modified, the chrooted directories where some files might be copied
 to  etc ...
 
 Just link where info are available should help me.
 
 Thanks for support.
 JF

http://www.google.com
http://marc.info/?l=openbsd-misc

- Robert



Re: Installing Apache PHP/Mysql support

2009-04-14 Thread Cezary Morga
Dnia wtorek, 14 kwietnia 2009, Jean-Francois napisa3:
 Now I saw there are many packages php5 and mysql, however it's not clear
 for me which ones to install and the conf files that need to be modified,
 the chrooted directories where some files might be copied to  etc ...

Install whichever packages you need. For PHP5+MySQL php5-core and php5-mysql
should suffice (mysql-server should be installed as a dependency if it's not
installed already).

These packages are prepared for OpenBSD's chrooted Apache however you may need
to create some additional directories (like tmp for example) within chroot.
The post-install message will tell you what to do.
--
Pozdrawiam,
Cezary Morga
Would those of you in the cheaper seats clap your hands? And the rest of you,
if you'll just rattle your jewelry. (John Lennon)



Re: Installing Apache PHP/Mysql support

2009-04-14 Thread Jean-Francois
Hi All,

Both pkg installed, links made, and after reboot, command line works :

$ php -i
phpinfo()
PHP Version = 5.2.6

but .php page shows only source code in firefox ?

One insight please ?

Le mardi 14 avril 2009 13:56:32, vous avez icrit :
 Dnia wtorek, 14 kwietnia 2009, Jean-Francois napisa3:
  Now I saw there are many packages php5 and mysql, however it's not clear
  for me which ones to install and the conf files that need to be modified,
  the chrooted directories where some files might be copied to  etc ...

 Install whichever packages you need. For PHP5+MySQL php5-core and
 php5-mysql should suffice (mysql-server should be installed as a dependency
 if it's not installed already).

 These packages are prepared for OpenBSD's chrooted Apache however you may
 need to create some additional directories (like tmp for example) within
 chroot. The post-install message will tell you what to do.



Re: Installing Apache PHP/Mysql support

2009-04-14 Thread Jean-Francois
For some reason the link creation did not work.
Now problem is solved.

Le mardi 14 avril 2009 16:11:17, vous avez icrit :
 Hi All,

 Both pkg installed, links made, and after reboot, command line works :

 $ php -i
 phpinfo()
 PHP Version = 5.2.6

 but .php page shows only source code in firefox ?

 One insight please ?

 Le mardi 14 avril 2009 13:56:32, vous avez icrit :
  Dnia wtorek, 14 kwietnia 2009, Jean-Francois napisa3:
   Now I saw there are many packages php5 and mysql, however it's not
   clear for me which ones to install and the conf files that need to be
   modified, the chrooted directories where some files might be copied to
   etc ...
 
  Install whichever packages you need. For PHP5+MySQL php5-core and
  php5-mysql should suffice (mysql-server should be installed as a
  dependency if it's not installed already).
 
  These packages are prepared for OpenBSD's chrooted Apache however you may
  need to create some additional directories (like tmp for example) within
  chroot. The post-install message will tell you what to do.



Re: Installing Apache PHP/Mysql support

2009-04-14 Thread Cezary Morga
Jean-Francois wrote:
 Hi All,

 Both pkg installed, links made, and after reboot, command line works :

 $ php -i
 phpinfo()
 PHP Version = 5.2.6

 but .php page shows only source code in firefox ?

Have you done everything mentioned in pkg_info -M php5-core? Especially the 
/var/www/conf/modules/php5.conf symlink?

Seems AddType or LoadModule is missing in your Apache configuration.

-- 
Cezary Morga
Would those of you in the cheaper seats clap your hands? And the rest of you, 
if you'll just rattle your jewelry. (John Lennon)



Re: Apache PHP

2009-03-08 Thread Vadim Zhukov
On 8 March 2009 c. 10:13:58 new_guy wrote:
 I compile some c code and link it statically. It's the simple 'hello
 world' program. I name it 'hello' and put it in /var/www/test/

 I then try to execute it through php using the shell_exec function
 like so:

 $output = shell_exec(/var/www/test/hello);
 echo $output;

 I get no output at all. Same program runs fine via shell_exec on other
 Apache PHP setups. Being this is statically linked and ldd shows no
 shared libs (the chroot should not impact it, right?) and the php.ini
 files does not exclude shell_exec from running... what else might be
 wrong?

1. You need shell to run shell_exec().

2. You should specify path _inside_ chroot: /test/hello.

For real exec() and friends see pcntl_* functions.

--
  Best wishes,
Vadim Zhukov



Re: Apache PHP

2009-03-08 Thread new_guy
Vadim Zhukov wrote:
 
 1. You need shell to run shell_exec().
 
 2. You should specify path _inside_ chroot: /test/hello.
 

Thanks guys. Because of your tips, I got it working. I've never dealt with a
chrooted Apache before. Off to read the docs. 


-- 
View this message in context: 
http://www.nabble.com/Apache---PHP-tp22395513p22401565.html
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Apache PHP

2009-03-07 Thread new_guy
I compile some c code and link it statically. It's the simple 'hello world'
program. I name it 'hello' and put it in /var/www/test/

I then try to execute it through php using the shell_exec function like so:

$output = shell_exec(/var/www/test/hello);
echo $output;

I get no output at all. Same program runs fine via shell_exec on other
Apache PHP setups. Being this is statically linked and ldd shows no shared
libs (the chroot should not impact it, right?) and the php.ini files does
not exclude shell_exec from running... what else might be wrong?
-- 
View this message in context: 
http://www.nabble.com/Apache---PHP-tp22395513p22395513.html
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: Apache PHP

2009-03-07 Thread LÉVAI Dániel
On Sunday 08 March 2009 08.13.58 you wrote:
 I compile some c code and link it statically. It's the simple 'hello
 world' program. I name it 'hello' and put it in /var/www/test/

 I then try to execute it through php using the shell_exec function
 like so:

 $output = shell_exec(/var/www/test/hello);
 echo $output;

 I get no output at all. Same program runs fine via shell_exec on
 other Apache PHP setups. Being this is statically linked and ldd
 shows no shared libs (the chroot should not impact it, right?) and
 the php.ini files does not exclude shell_exec from running... what
 else might be wrong?

Do you have a shell executable in your chroot?

Daniel

-- 
LEVAI Daniel
PGP key ID = 0x4AC0A4B1
Key fingerprint = D037 03B9 C12D D338 4412  2D83 1373 917A 4AC0 A4B1



apache + php

2007-07-11 Thread Adam PAPAI

Hello,

I have the following problem with the php and the httpd.
We have a bit-modified kernel:

in /usr/src/sys/arch/i386/conf/GENERIC we changed the
maxusers256


unaame -a
OpenBSD arsenic.digitalinfluence.hu 4.1 GENERIC.MP#1 i386


The system hangs after 1 day. It's a very strongly loaded system. Any 
idea why? It seems that the system does not really handle the http 
requests well.


/var/www/log/access_log snippet:

httpd in malloc(): error: recursive call
httpd in malloc(): error: recursive call
[Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal Segmentation
fault (11)
[Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal Segmentation
fault (11)
[Mon Jul  9 18:33:42 2007] [error] [client 84.3.75.29] File does not exist:
/users/reklamcsere/favicon.ico
[Mon Jul  9 18:33:53 2007] [error] [client 83.216.56.20] File does not 
exist:

/users/reklamcsere/images/px1.gif


last load:

load averages: 166.08, 190.05, 175.78
18:33:49
238 processes: 1 running, 236 idle, 1 on processor
CPU0 states:  8.8% user,  0.0% nice,  6.0% system,  0.0% interrupt, 
85.2% idle
CPU1 states:  0.8% user,  0.0% nice,  1.4% system,  0.0% interrupt, 
97.8% idle

Memory: Real: 213M/511M act/tot  Free: 491M  Swap: 0K/512M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
  16469 www20 3432K 4724K sleep/0  netio1:01  1.61% httpd
  11982 www20 3424K 4724K sleep/0  netio0:21  1.51% httpd
  27986 www20 3408K 4672K sleep/0  netio0:19  1.51% httpd
  29148 www20 3824K 4952K sleep/0  netio1:00  1.46% httpd
  23427 www20 3432K 4724K sleep/0  netio0:23  1.42% httpd
   1392 www20 3428K 4876K sleep/0  netio0:45  1.37% httpd
   16673 www20 3428K 4756K sleep/0  netio1:40  1.32% httpd
   10830 www20 3420K 4724K sleep/1  netio1:22  1.32% httpd
   32318 www20 3408K 4616K sleep/0  netio1:07  1.32% httpd


vmstat:

 4 usersLoad166.08190.05175.78  Mon Jul  9 18:33:49 
2007
memory totals (in KB)PAGING   SWAPPING 
Interrupts
   real   virtual free   in  out   in  out  773 
total
Active   218444218444   502752   ops200 
clock

All  523712523712  1027036   pages  163 ipi

 ahc0
Proc:r  d  s  wCsw   Trp   Sys   Int   Sof  Flt 1 forks 201 fxp0
3207   479  2141  3093   410   223 1933   fkppw 209 
fxp1

 fksvm
   0.0%Int   3.7%Sys   4.8%Usr   0.0%Nic  91.5%Idle   pwait
|||||||||||   relck
==  rlkok
  noram
Namei Sys-cacheProc-cacheNo-cache 324 ndcpy
Calls hits%hits %miss   % fltcp
 2047 2047  100  1107 zfod
  103 cow
Disks   sd0   sd1   cd0   fd0 128 fmin
seeks 170 ftarg
xfers   26444 itarg
Kbyte13 3 wired
  sec   0.0   pdfre
  pdscn
  pzidle
 1308 kmapent


dmesg:
OpenBSD 4.1-current (GENERIC.MP) #1: Sun Jul  8 23:42:42 CEST 2007

[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel Pentium III (GenuineIntel 686-class) 1 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE

real mem  = 1073221632 (1048068K)
avail mem = 971218944 (948456K)
using 4278 buffers containing 53784576 bytes (52524K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+ BIOS, date 05/15/02, BIOS32 rev. 0 @ 0xfd5e1
pcibios0 at bios0: rev 2.1 @ 0xf/0x
pcibios0: PCI BIOS has 7 Interrupt Routing table entries
pcibios0: PCI Interrupt Router at 000:15:0 (ServerWorks OSB4 rev 0x00)
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc/0xa000 0xca000/0x1800 0xcb800/0x5200
acpi at mainbus0 not configured
mainbus0: Intel MP Specification (Version 1.4)
cpu0 at mainbus0: apid 3 (boot processor)
cpu0: apic clock running at 132 MHz
cpu1 at mainbus0: apid 0 (application processor)
cpu1: Intel Pentium III (GenuineIntel 686-class)
cpu1: FPU,CX8,APIC
mainbus0: bus 0 is type PCI
mainbus0: bus 1 is type PCI
mainbus0: bus 2 is type ISA
ioapic0 at mainbus0: apid 14 pa 0xfec0, version 11, 16 pins
ioapic1 at 

Re: apache + php

2007-07-11 Thread Otto Moerbeek
On Wed, 11 Jul 2007, Adam PAPAI wrote:

 Hello,
 
 I have the following problem with the php and the httpd.
 We have a bit-modified kernel:
 
 in /usr/src/sys/arch/i386/conf/GENERIC we changed the
 maxusers256
 
 
 unaame -a
 OpenBSD arsenic.digitalinfluence.hu 4.1 GENERIC.MP#1 i386
 
 
 The system hangs after 1 day. It's a very strongly loaded system. Any idea
 why? It seems that the system does not really handle the http requests well.
 
 /var/www/log/access_log snippet:
 
 httpd in malloc(): error: recursive call
 httpd in malloc(): error: recursive call
 [Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort (6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort (6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal Segmentation
 fault (11)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal Segmentation
 fault (11)
 [Mon Jul  9 18:33:42 2007] [error] [client 84.3.75.29] File does not exist:
 /users/reklamcsere/favicon.ico
 [Mon Jul  9 18:33:53 2007] [error] [client 83.216.56.20] File does not exist:
 /users/reklamcsere/images/px1.gif

The aborts and seg faults are likely caused by php. It's mostly sloppy
programming by the php developers.

Why your system hangs is hard to tell. Apart from a quite high load
avarage I see no obvious cases of running out of resources. vmstat -m
might give a clue.  You could be also running out of file descriptors.
Try increasing kern.maxfiles.

-Otto

 
 
 last load:
 
 load averages: 166.08, 190.05, 175.78
 18:33:49
 238 processes: 1 running, 236 idle, 1 on processor
 CPU0 states:  8.8% user,  0.0% nice,  6.0% system,  0.0% interrupt, 85.2% idle
 CPU1 states:  0.8% user,  0.0% nice,  1.4% system,  0.0% interrupt, 97.8% idle
 Memory: Real: 213M/511M act/tot  Free: 491M  Swap: 0K/512M used/tot
 
   PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
   16469 www20 3432K 4724K sleep/0  netio1:01  1.61% httpd
   11982 www20 3424K 4724K sleep/0  netio0:21  1.51% httpd
   27986 www20 3408K 4672K sleep/0  netio0:19  1.51% httpd
   29148 www20 3824K 4952K sleep/0  netio1:00  1.46% httpd
   23427 www20 3432K 4724K sleep/0  netio0:23  1.42% httpd
1392 www20 3428K 4876K sleep/0  netio0:45  1.37% httpd
16673 www20 3428K 4756K sleep/0  netio1:40  1.32% httpd
10830 www20 3420K 4724K sleep/1  netio1:22  1.32% httpd
32318 www20 3408K 4616K sleep/0  netio1:07  1.32% httpd
 
 
 vmstat:
 
  4 usersLoad166.08190.05175.78  Mon Jul  9 18:33:49 2007
 memory totals (in KB)PAGING   SWAPPING Interrupts
real   virtual free   in  out   in  out  773 total
 Active   218444218444   502752   ops200 clock
 All  523712523712  1027036   pages  163 ipi
 
  ahc0
 Proc:r  d  s  wCsw   Trp   Sys   Int   Sof  Flt 1 forks 201 fxp0
 3207   479  2141  3093   410   223 1933   fkppw 209 fxp1
  fksvm
0.0%Int   3.7%Sys   4.8%Usr   0.0%Nic  91.5%Idle   pwait
 |||||||||||   relck
 ==  rlkok
   noram
 Namei Sys-cacheProc-cacheNo-cache 324 ndcpy
 Calls hits%hits %miss   % fltcp
  2047 2047  100  1107 zfod
   103 cow
 Disks   sd0   sd1   cd0   fd0 128 fmin
 seeks 170 ftarg
 xfers   26444 itarg
 Kbyte13 3 wired
   sec   0.0   pdfre
   pdscn
   pzidle
  1308 kmapent
 
 
 dmesg:
 OpenBSD 4.1-current (GENERIC.MP) #1: Sun Jul  8 23:42:42 CEST 2007
 
 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP
 cpu0: Intel Pentium III (GenuineIntel 686-class) 1 GHz
 cpu0:
 FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
 real mem  = 1073221632 (1048068K)
 avail mem = 971218944 (948456K)
 using 4278 buffers containing 53784576 bytes (52524K) of memory
 mainbus0 (root)
 bios0 at mainbus0: AT/286+ BIOS, date 05/15/02, BIOS32 rev. 0 @ 0xfd5e1
 pcibios0 at bios0: rev 2.1 @ 0xf/0x
 pcibios0: PCI BIOS has 7 Interrupt Routing table entries
 pcibios0: PCI Interrupt Router at 000:15:0 (ServerWorks OSB4 rev 0x00)
 pcibios0: PCI bus #0 is the last bus
 bios0: ROM 

Re: apache + php

2007-07-11 Thread Marc Balmer

Otto Moerbeek wrote:

On Wed, 11 Jul 2007, Adam PAPAI wrote:


Hello,

I have the following problem with the php and the httpd.
We have a bit-modified kernel:

in /usr/src/sys/arch/i386/conf/GENERIC we changed the
maxusers256


unaame -a
OpenBSD arsenic.digitalinfluence.hu 4.1 GENERIC.MP#1 i386


The system hangs after 1 day. It's a very strongly loaded system. Any idea
why? It seems that the system does not really handle the http requests well.

/var/www/log/access_log snippet:

httpd in malloc(): error: recursive call
httpd in malloc(): error: recursive call
[Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal Segmentation
fault (11)
[Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal Segmentation
fault (11)
[Mon Jul  9 18:33:42 2007] [error] [client 84.3.75.29] File does not exist:
/users/reklamcsere/favicon.ico
[Mon Jul  9 18:33:53 2007] [error] [client 83.216.56.20] File does not exist:
/users/reklamcsere/images/px1.gif


The aborts and seg faults are likely caused by php. It's mostly sloppy
programming by the php developers.

Why your system hangs is hard to tell. Apart from a quite high load
avarage I see no obvious cases of running out of resources. vmstat -m
might give a clue.  You could be also running out of file descriptors.
Try increasing kern.maxfiles.


A know problem exists with PHP and anonymous mmaps in the kernel.  I do 
not know if this is what hits you here, but the symptons look much like it.


a busy system that runs, e.g. the horde/imp webmailer will hang within a 
short time (1.5 days over here).


until there is a better solution, the workaround is quite easy:  restart 
httpd in a cronjob.




last load:

load averages: 166.08, 190.05, 175.78
18:33:49
238 processes: 1 running, 236 idle, 1 on processor
CPU0 states:  8.8% user,  0.0% nice,  6.0% system,  0.0% interrupt, 85.2% idle
CPU1 states:  0.8% user,  0.0% nice,  1.4% system,  0.0% interrupt, 97.8% idle
Memory: Real: 213M/511M act/tot  Free: 491M  Swap: 0K/512M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATEWAIT TIMECPU COMMAND
  16469 www20 3432K 4724K sleep/0  netio1:01  1.61% httpd
  11982 www20 3424K 4724K sleep/0  netio0:21  1.51% httpd
  27986 www20 3408K 4672K sleep/0  netio0:19  1.51% httpd
  29148 www20 3824K 4952K sleep/0  netio1:00  1.46% httpd
  23427 www20 3432K 4724K sleep/0  netio0:23  1.42% httpd
   1392 www20 3428K 4876K sleep/0  netio0:45  1.37% httpd
   16673 www20 3428K 4756K sleep/0  netio1:40  1.32% httpd
   10830 www20 3420K 4724K sleep/1  netio1:22  1.32% httpd
   32318 www20 3408K 4616K sleep/0  netio1:07  1.32% httpd


vmstat:

 4 usersLoad166.08190.05175.78  Mon Jul  9 18:33:49 2007
memory totals (in KB)PAGING   SWAPPING Interrupts
   real   virtual free   in  out   in  out  773 total
Active   218444218444   502752   ops200 clock
All  523712523712  1027036   pages  163 ipi

 ahc0
Proc:r  d  s  wCsw   Trp   Sys   Int   Sof  Flt 1 forks 201 fxp0
3207   479  2141  3093   410   223 1933   fkppw 209 fxp1
 fksvm
   0.0%Int   3.7%Sys   4.8%Usr   0.0%Nic  91.5%Idle   pwait
|||||||||||   relck
==  rlkok
  noram
Namei Sys-cacheProc-cacheNo-cache 324 ndcpy
Calls hits%hits %miss   % fltcp
 2047 2047  100  1107 zfod
  103 cow
Disks   sd0   sd1   cd0   fd0 128 fmin
seeks 170 ftarg
xfers   26444 itarg
Kbyte13 3 wired
  sec   0.0   pdfre
  pdscn
  pzidle
 1308 kmapent


dmesg:
OpenBSD 4.1-current (GENERIC.MP) #1: Sun Jul  8 23:42:42 CEST 2007

[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel Pentium III (GenuineIntel 686-class) 1 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 1073221632 (1048068K)
avail mem = 971218944 (948456K)
using 4278 buffers containing 53784576 bytes (52524K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+ 

Re: apache + php

2007-07-11 Thread Joachim Schipper
On Wed, Jul 11, 2007 at 12:56:27PM +0200, Marc Balmer wrote:
 Otto Moerbeek wrote:
 On Wed, 11 Jul 2007, Adam PAPAI wrote:
 The system hangs after 1 day. It's a very strongly loaded system. Any idea
 why? It seems that the system does not really handle the http requests 
 well.
 
 /var/www/log/access_log snippet:
 
 httpd in malloc(): error: recursive call
 httpd in malloc(): error: recursive call
 [Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort (6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort (6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal 
 Segmentation
 fault (11)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal 
 Segmentation
 fault (11)
 
 The aborts and seg faults are likely caused by php. It's mostly sloppy
 programming by the php developers.
 
 A know problem exists with PHP and anonymous mmaps in the kernel.  I do 
 not know if this is what hits you here, but the symptons look much like it.
 
 a busy system that runs, e.g. the horde/imp webmailer will hang within a 
 short time (1.5 days over here).
 
 until there is a better solution, the workaround is quite easy:  restart 
 httpd in a cronjob.

I'm sorry to intrude here, but is this problem new? I was not aware of
it. (And as a follow-up, can we expect it to be fixed any time soon?)

Joachim

-- 
PotD: x11/iwidgets - Iwidgets Mega Widget Set



Re: apache + php

2007-07-11 Thread Marc Balmer

Joachim Schipper wrote:

On Wed, Jul 11, 2007 at 12:56:27PM +0200, Marc Balmer wrote:

Otto Moerbeek wrote:

On Wed, 11 Jul 2007, Adam PAPAI wrote:

The system hangs after 1 day. It's a very strongly loaded system. Any idea
why? It seems that the system does not really handle the http requests 
well.


/var/www/log/access_log snippet:

httpd in malloc(): error: recursive call
httpd in malloc(): error: recursive call
[Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort (6)
[Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal 
Segmentation

fault (11)
[Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal 
Segmentation

fault (11)

The aborts and seg faults are likely caused by php. It's mostly sloppy
programming by the php developers.
A know problem exists with PHP and anonymous mmaps in the kernel.  I do 
not know if this is what hits you here, but the symptons look much like it.


a busy system that runs, e.g. the horde/imp webmailer will hang within a 
short time (1.5 days over here).


until there is a better solution, the workaround is quite easy:  restart 
httpd in a cronjob.


I'm sorry to intrude here, but is this problem new? I was not aware of
it. (And as a follow-up, can we expect it to be fixed any time soon?)


it is being worked on.



Re: apache + php

2007-07-11 Thread Marcos Laufer
I've been seeing this since OpenBSD 3.4 with Uebimiau php webmail and
sometimes httpd stops working, restarting is needed.

- Original Message - 
From: Joachim Schipper [EMAIL PROTECTED]
To: misc@openbsd.org
Sent: Wednesday, July 11, 2007 10:28 AM
Subject: Re: apache + php


On Wed, Jul 11, 2007 at 12:56:27PM +0200, Marc Balmer wrote:
 Otto Moerbeek wrote:
 On Wed, 11 Jul 2007, Adam PAPAI wrote:
 The system hangs after 1 day. It's a very strongly loaded system. Any
idea
 why? It seems that the system does not really handle the http requests
 well.
 
 /var/www/log/access_log snippet:
 
 httpd in malloc(): error: recursive call
 httpd in malloc(): error: recursive call
 [Mon Jul  9 18:33:39 2007] [notice] child pid 24755 exit signal Abort
(6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 10372 exit signal Abort
(6)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 11192 exit signal
 Segmentation
 fault (11)
 [Mon Jul  9 18:33:39 2007] [notice] child pid 15994 exit signal
 Segmentation
 fault (11)
 
 The aborts and seg faults are likely caused by php. It's mostly sloppy
 programming by the php developers.

 A know problem exists with PHP and anonymous mmaps in the kernel.  I do
 not know if this is what hits you here, but the symptons look much like
it.

 a busy system that runs, e.g. the horde/imp webmailer will hang within a
 short time (1.5 days over here).

 until there is a better solution, the workaround is quite easy:  restart
 httpd in a cronjob.

I'm sorry to intrude here, but is this problem new? I was not aware of
it. (And as a follow-up, can we expect it to be fixed any time soon?)

Joachim

-- 
PotD: x11/iwidgets - Iwidgets Mega Widget Set



Apache + PHP + FreeTDS

2006-01-17 Thread Helio Santana
Hello,
I am trying to connect to a Microsoft SQL Server with an Apache+PHP but
always get an error.

This are the packages on my system (OpenBSD 3.7). Only this 3 packages
(it's a new box)

freetds-0.62.4p0project to document and implement the TDS protocol
libiconv-1.9.2  character set conversion library
libxml-2.6.16p0 XML parsing library

I have download PHP 5.1.2 and compile with this commands:

# cd /tmp
# ftp url_to_php/php-5.1.2.tar.gz
# tar -xvzf php-5.1.2.tar.gz
# ./configure --with-apxs=/usr/sbin/apxs --with-mssql
# make
# make install

# vi /var/www/conf/httpd.conf
I add:
LoadModule php5_module/usr/lib/apache/modules/libphp5.so
AddType application/x-httpd-php .php

# apachectl start

put phpinfo.php file in /var/www/htdocs/ this is the result of mssql
section:

mssql
   MSSQL Support
  enabled
Active Persistent Links 
0 
Active Links 
0 
Library version 
FreeTDS 

   Directive
  Local Value
  Master Value
mssql.allow_persistent
On
On
mssql.batchsize
0
0
mssql.charset
no value
no value
mssql.compatability_mode
Off
Off
mssql.connect_timeout
5
5
mssql.datetimeconvert
On
On
mssql.max_links
Unlimited
Unlimited
mssql.max_persistent
Unlimited
Unlimited
mssql.max_procs
Unlimited
Unlimited
mssql.min_error_severity
10
10
mssql.min_message_severity
10
10
mssql.secure_connection
Off
Off
mssql.textlimit
Server default
Server default
mssql.textsize
Server default
Server default
mssql.timeout
60
60

but when I try to connect to the SQL server with a simple command
?
$conectID = mssql_connect(192.168.81.52:1433,user,password);
?

the response is:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: 192.168.81.52:1433 in /htdocs/index2.php on line 2

Ping and telnet works fine.
# ping 192.168.81.52
# telnet 192.168.81.52 1433.
Also I can connect executing '# tsql -H 192.168.81.52 -p 1433 -U user'

But from the script PHP it doesn't work.

Apache is chrooted (by default in OBSD). But if I download Apache and
compile Apache2, then compile PHP (and leave Apache not chrooted) the
script works fine...

My question: I have to do something with chroot and FreeTDS? (I don't
know what to do). Or this is a known problem of Apache 1.3.29? (I don't
find anything in google about a problem) and Apache can't be chrooted?

Thanks in advance.
Helio.



Re: Apache + PHP + FreeTDS

2006-01-17 Thread L. V. Lammert

At 10:55 PM 1/17/2006 +, Helio Santana wrote:

Hello,
I am trying to connect to a Microsoft SQL Server with an Apache+PHP but
always get an error.

This are the packages on my system (OpenBSD 3.7). Only this 3 packages
(it's a new box)

freetds-0.62.4p0project to document and implement the TDS protocol
libiconv-1.9.2  character set conversion library
libxml-2.6.16p0 XML parsing library

My question: I have to do something with chroot and FreeTDS? (I don't
know what to do). Or this is a known problem of Apache 1.3.29? (I don't
find anything in google about a problem) and Apache can't be chrooted?


Don't have any specific info, .. but, in general, to use chroot'd Apache 
all of the files needed must be located IN the chroot. For example, if you 
need /bin/sh, there must be a copy in /var/www/bin/sh (assuming /var/www is 
your chroot).


I would wager the files do NOT install inside the chroot, so copying them 
there should fix teh problem.


Lee