Trouble compiling PHP extension w/ threaded PHP 5.2.4

Hello,
I'm having some trouble installing the Berkeley DB XML PHP extension on Debian Sarge 3.1.
First, I installed Berkeley DB XML 2.3.10 using the buildall.sh script into /usr/local/dbxml-2.3.10/.
Then, I downloaded PHP 5.2.4 source code, compiled it using pthreads (configure --enable-maintainer-zts) and installed it in /usr/local/php-5.2.4/.
I've built the db4.so extension and it seems to work (verified by running the example simple_counter.php script and seeing that the counter is incremented).
However, building the Berkeley DB XML extension fails with the following error:
/home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp: In function `void zim_XmlEventReaderToWriter_XmlEventReaderToWriter(int, zval*, zval**, zval*, int, void***)':
/home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:27: error: parse error before `*' token
/home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:27: error: `reader' declared as reference but not initialized
/home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:29: error: parse error before `*' token
/home/dbxml-2.3.10/dbxml/src/php/php_dbxml_eventreadertowriter.cpp:29: error: `writer' declared as reference but not initialized
It's solved by changing TSRMLS_DC to TSRMLS_CC in these two lines:
26 XmlEventReader &reader =
27 php_dbxml_get_XmlEventReader_object_pointer(rval TSRMLS_CC);
28 XmlEventWriter &writer =
29 php_dbxml_get_XmlEventWriter_object_pointer(wval TSRMLS_CC);
However, there are still errors:
/usr/local/php-5.2.4/include/php/Zend/zend_exceptions.h: In function `void php_dbxml_init_exceptions()':
/usr/local/php-5.2.4/include/php/Zend/zend_exceptions.h:33: error: too few arguments to function `zend_class_entry* zend_exception_get_default(void***)'
/home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: at this point in file
/home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: `tsrm_ls' undeclared (first use this function)
/home/loumz/xspc2/dbxml-2.3.10/dbxml/src/php/php_dbxml_exception.cpp:25: error: (Each undeclared identifier is reported only once for each function it appears in.)
This is because maybe zend_exception_get_default needs the tsrm_ls (what is this anyway? some sort of thread-local storage pointer?)
OK, but inside the php_dbxml_init_exceptions() there is no pointer so it is fixed with a fetch (also there is another one like that on line 51):
22 void php_dbxml_init_exceptions()
23 {
24 zend_class_entry ce;
25 TSRMLS_FETCH();
26 PHP_DBXML_REGISTER_CLASS_WITH_PARENT(XmlException, zend_exception_get_default(TSRMLS_C), php_dbxml_XmlException_dtor);
49 zval *xml_ex;
50 TSRMLS_FETCH();
51 MAKE_STD_ZVAL(xml_ex);
In php_dbxml_document.cpp there is also use of TSRMLS_DC inside code that leads to errors (Looking at the macro definition I think this is for declarations right?) so we change it.
80 XmlEventWriter &writer = php_dbxml_get_XmlEventWriter_object_pointer(zv TSRMLS_CC);
103 XmlEventReader &reader = php_dbxml_get_XmlEventReader_object_pointer(zstr TSRMLS_CC);
And finally it compiled and worked (judging by the examples anyway).
Please tell me if I did something wrong along the way. Is it better to compile PHP without ZTS and compile BDB XML without pthreads to avoid this mess?

It seems like that was not the end of the troubles. When executing examples/10.php php crashes with a relocation error saying that it can't find php_db4_getDbEnvFromObj (which should be in the db4.so php module).
OK, so I grab the g++ linking command that the libtool invocation spits out and add the installed db4.so to the object files and the extension diretory to rpath (I don't know if I can use the config.m4 because the db4.so has no lib prefix i.e. libdb4.so). Now ldd reports that it's linking correctly to the installed db4.so so I try again. The same relocation error pops up.
When I checked, it seems like db4.so has C++ mangled symbol of php_db4_getDbEnvFromObj(_zval_struct*, void***), but not the C form, and dbxml.so is expecting the C form because it includes php_db4.h inside extern "C".
This is probably because while the header php_db4.h is included within extern "C" {} within the db4.cpp impl file, the prototypes don't match (there is one additional param in the impl) between the ones in the header and the ones in the .cpp file because of the threading additions...
Why do I get the feeling the compilation w/ threaded PHP has not been tested at all :-(. I give up, I'm compiling a nonthreaded version of PHP instead. For my use, this shouldn't matter anyway, but it would be nice if it was possible (or at least say it's not quite tested in the README file).

Similar Messages

  • Compiling Apache 2.2 and php 5.2 from source on Arch

    Hi there
    Wanting to compile Apache 2 with PHP 5 on my Arch server. I figure this must be frequently done by people out there wanting more control over how their servers are setup, and was wondering if anyone had some good documentation for this? If none exists I'm keen to work on putting it up on the Arch Wiki.
    I've compiled apache httpd-2.2.16 from source already, and have it running nicely.
    Apache compile options were:
    ./configure --prefix=/usr/local/apache \
    --enable-rewrite --enable-ssl --enable-so \
    --enable-mime-magic --enable-suexec \
    --enable-static-rotatelogs \
    --disable-imap --disable-userdir --enable-cgi \
    --disable-dav \
    --disable-proxy-connect --disable-proxy-ftp --disable-proxy-http --disable-proxy \
    --disable-authnz-ldap
    $ /usr/local/apache/bin/httpd -Vvv
    Server version: Apache/2.2.16 (Unix)
    Server built: Sep 6 2010 06:10:41
    Server's Module Magic Number: 20051115:24
    Server loaded: APR 1.4.2, APR-Util 1.3.9
    Compiled using: APR 1.4.2, APR-Util 1.3.9
    Architecture: 32-bit
    Server MPM: Prefork
    threaded: no
    forked: yes (variable process count)
    Server compiled with....
    -D APACHE_MPM_DIR="server/mpm/prefork"
    -D APR_HAS_SENDFILE
    -D APR_HAS_MMAP
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
    -D APR_USE_SYSVSEM_SERIALIZE
    -D APR_USE_PTHREAD_SERIALIZE
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
    -D APR_HAS_OTHER_CHILD
    -D AP_HAVE_RELIABLE_PIPED_LOGS
    -D DYNAMIC_MODULE_LIMIT=128
    -D HTTPD_ROOT="/usr/local/apache"
    -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
    -D DEFAULT_PIDLOG="logs/httpd.pid"
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
    -D DEFAULT_LOCKFILE="logs/accept.lock"
    -D DEFAULT_ERRORLOG="logs/error_log"
    -D AP_TYPES_CONFIG_FILE="conf/mime.types"
    -D SERVER_CONFIG_FILE="conf/httpd.conf"
    Now installing PHP from source is proving to not work out so easily.
    root@server: ~/source-programs/apache/httpd-2.2.16/php-5.2.14
    $ ./configure with-apxs2=/usr/local/apache/bin/apxs --prefix=/usr/local/apache/php
    configure: warning: with-apxs2=/usr/local/apache/bin/apxs: invalid host type
    loading cache ./config.cache
    checking for Cygwin environment... (cached) no
    checking for mingw32 environment... (cached) no
    checking for egrep... (cached) grep -E
    checking for a sed that does not truncate output... (cached) /bin/sed
    checking host system type... with-apxs2=/usr/local/apache/bin/apxs
    checking target system type... with-apxs2=/usr/local/apache/bin/apxs
    checking for gcc... (cached) gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking how to run the C preprocessor... (cached) gcc -E
    checking for icc... no
    checking for suncc... no
    checking whether gcc and cc understand -c and -o together... (cached) yes
    checking how to run the C preprocessor... gcc -E
    checking for AIX... no
    checking whether ln -s works... (cached) yes
    checking for system library directory... lib
    checking whether to enable runpaths... yes
    checking if compiler supports -R... (cached) no
    checking if compiler supports -Wl,-rpath,... (cached) yes
    checking for gawk... (cached) gawk
    checking for bison... (cached) bison -y
    checking for bison version... (cached) invalid
    configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 (found: none).
    checking for flex... (cached) flex
    checking for yywrap in -lfl... (cached) yes
    checking lex output file root... (cached) lex.yy
    checking whether yytext is a pointer... (cached) yes
    checking for working const... (cached) yes
    checking for flex version... (cached) invalid
    configure: warning: flex versions supported for regeneration of the Zend/PHP parsers: 2.5.4 (found: )
    checking for re2c... no
    configure: warning: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking whether to force non-PIC code in shared modules... no
    checking whether /dev/urandom exists... yes
    checking for pthreads_cflags... (cached) -pthread
    checking for pthreads_lib... (cached)
    Configuring SAPI modules
    checking for AOLserver support... no
    checking for Apache 1.x module support via DSO through APXS... no
    checking for Apache 1.x module support... no
    checking whether to enable Apache charset compatibility option... no
    checking for Apache 2.0 filter-module support via DSO through APXS... no
    checking for Apache 2.0 handler-module support via DSO through APXS... no
    checking for Apache 1.x (hooks) module support via DSO through APXS... no
    checking for Apache 1.x (hooks) module support... no
    checking whether to enable Apache charset compatibility option... no
    I end up with the PHP bin files, but just can't get the module to compile.
    $ /usr/local/apache/php/bin/php -v     
    PHP 5.2.14 (cli) (built: Sep  6 2010 05:37:45)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    Have tried to make Apache execute php bin via CGI without any luck, but I think I'd rather work on compiling PHP into a module properly.
    Any help or pointers in the right direction would be greatly appreciated.
    Thanks
    Last edited by craig_nz (2010-09-08 08:07:13)

    Thanks for this!
    Using:
    ./configure \
    --with-apxs2=/usr/local/apache/bin/apxs \
    --prefix=/usr/local/apache/php \
    --disable-cgi
    --enable-so \
    --enable-rewrite \
    make
    libtool --finish /root/source-programs/apache/httpd-2.2.16/php-5.2.14/libs
    In /usr/local/apache/modules I get:
    libphp5.a  libphp5.la
    No libphp5.so yet but closer.. Also looking at how I can use ABS just to compile php.

  • Cannot install the PHP extension

    After running buildall.sh trying to compile the php extension leads to:
    ivan:/home/ivan/software/dbxml-2.4.13/dbxml/src/php# make
    /bin/sh /home/ivan/software/dbxml-2.4.13/dbxml/src/php/libtool --mode=link g++ -DPHP_ATOM_INC -I/home/ivan/software/dbxml-2.4.13/dbxml/src/php/include -I/home/ivan/software/dbxml-2.4.13/dbxml/src/php/main -I/home/ivan/software/dbxml-2.4.13/dbxml/src/php -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/ivan/software/dbxml-2.4.13/install/include -I/home/ivan/software/dbxml-2.4.13/db-4.6.21/php_db4  -DHAVE_CONFIG_H  -g -O2   -o dbxml.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/ivan/software/dbxml-2.4.13/dbxml/src/php/modules  php_dbxml.lo php_dbxml_manager.lo php_dbxml_resolver.lo php_dbxml_container.lo php_dbxml_eventreader.lo php_dbxml_eventwriter.lo php_dbxml_eventreadertowriter.lo php_dbxml_exception.lo php_dbxml_inputstream.lo php_dbxml_transaction.lo php_dbxml_results.lo php_dbxml_value.lo php_dbxml_queryexpression.lo php_dbxml_querycontext.lo php_dbxml_updatecontext.lo php_dbxml_modify.lo php_dbxml_indexspecification.lo php_dbxml_data.lo php_dbxml_document.lo php_dbxml_statistics.lo php_dbxml_indexlookup.lo -Wl,-rpath,/lib -L/lib -lxqilla -Wl,-rpath,/lib -L/lib -lxerces-c -Wl,-rpath,/home/ivan/software/dbxml-2.4.13/install/lib -L/home/ivan/software/dbxml-2.4.13/install/lib -ldbxml-2 -Wl,-rpath,/home/ivan/software/dbxml-2.4.13/install/lib -L/home/ivan/software/dbxml-2.4.13/install/lib -ldb_cxx -lstdc++
    g++ -shared .libs/php_dbxml.o .libs/php_dbxml_manager.o .libs/php_dbxml_resolver.o .libs/php_dbxml_container.o .libs/php_dbxml_eventreader.o .libs/php_dbxml_eventwriter.o .libs/php_dbxml_eventreadertowriter.o .libs/php_dbxml_exception.o .libs/php_dbxml_inputstream.o .libs/php_dbxml_transaction.o .libs/php_dbxml_results.o .libs/php_dbxml_value.o .libs/php_dbxml_queryexpression.o .libs/php_dbxml_querycontext.o .libs/php_dbxml_updatecontext.o .libs/php_dbxml_modify.o .libs/php_dbxml_indexspecification.o .libs/php_dbxml_data.o .libs/php_dbxml_document.o .libs/php_dbxml_statistics.o .libs/php_dbxml_indexlookup.o -Wl,--rpath -Wl,/home/ivan/software/dbxml-2.4.13/install/lib -Wl,--rpath -Wl,/home/ivan/software/dbxml-2.4.13/install/lib -L/lib /home/ivan/software/dbxml-2.4.13/install/lib/libxqilla.so -lxerces-c -L/home/ivan/software/dbxml-2.4.13/install/lib -ldbxml-2 -ldb_cxx -lstdc++ -Wl,-rpath -Wl,/lib -Wl,-rpath -Wl,/lib -Wl,-rpath -Wl,/home/ivan/software/dbxml-2.4.13/install/lib -Wl,-rpath -Wl,/home/ivan/software/dbxml-2.4.13/install/lib -Wl,-soname -Wl,dbxml.so -o .libs/dbxml.so
    */usr/bin/ld: cannot find -ldbxml-2*
    collect2: ld returned 1 exit status
    make: *** [dbxml.la] Error 1
    Here is a list of /home/ivan/software/dbxml-2.4.13/install/lib:
    libdb-4.6.a libdb-4.so libdb_cxx-4.6.la libdb_cxx.a libdbxml-2.4.a libdbxml.a libxerces-c.so.28 libxqilla.la libxqilla.so.4.0.1
    libdb-4.6.la libdb.a libdb_cxx-4.6.so libdb_cxx.so libdbxml-2.4.la libdbxml.so libxerces-c.so.28.0 libxqilla.so
    libdb-4.6.so libdb_cxx-4.6.a libdb_cxx-4.so libdb.so libdbxml-2.4.so libxerces-c.so libxqilla.a libxqilla.so.4
    So it looks ok, but still doesn't find what it needs.
    Any ideas?
    Edited by: user7286143 on Sep 5, 2008 3:17 AM

    Try going to file dbxml/src/php/config.m4 and change the line
    PHP_ADD_LIBRARY_WITH_PATH(dbxml-2, $PHP_DBXML/lib, DBXML_SHARED_LIBADD)to
    PHP_ADD_LIBRARY_WITH_PATH(dbxml, $PHP_DBXML/lib, DBXML_SHARED_LIBADD)Then re-configure and rebuild the PHP src.
    Lauren Foutz

  • HowTo: The SSH2 PHP Extension and You

    Until a few days ago, I didn't care about the SSH extension for PHP. I didn't have a use for it. Why should I care. Then I discovered that Wordpress' autoupdate feature wouldn't work without it (if you use SFTP, like I do). Oh. Maybe I need this thing.
    Problem 1) It isn't installed by default by Apple.
    Problem 2) All the online help says to use PECL to install it. Also not installed.
    Problem 3) Everything else that could possibly go wrong.
    So, I'm not guaranteeing this will work for you, or not destroy your server completely, but it worked for me. So...um...beware.
    The end result we're looking for is a nice little ssh2.so extension for php to look at. Now, let's try to get there:
    With all this talk of PECL, I decided to grab PEAR (which seems to no longer be a part of the OS) and install it. So I downloaded go-pear from: http://pear.php.net/go-pear and installed that.
    The only thing you need to change is the install directory (/usr/local is what I used, I think).
    Next comes the libssh libraries. These are required. Sadly, I could not install these from source. The reason? I received many errors about libz.dylib being of the wrong architecture. Weird, because I believe that came with the system. So it's Apple's fault if it's not i386 and 64bit. Darn.
    So I did a crazy thing and installed it through a port. Well, I backed up all of my existing libssh and libssl files before I did anything. Then I used Macports to install recent versions of those into /opt/local/lib
    Once that was done, I copied them over to /usr/local/lib and then crossed my fingers.
    Get the source from: http://www.libssh2.org/ then configure it with:
    +MACOSXDEPLOYMENTTARGET=10.6 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bindatload" ./configure --with-openssl+
    make
    +make install+
    If that works, you're halfway done.
    Download the latest PECL package for ssh2 from: http://pecl.php.net/package/ssh2
    Go to the directory and do the following:
    phpize
    Now stop. There's a bug in php that prevents this from working properly. So we have to patch it. Yeah, I told you this process was ridiculous. Copy this: http://remi.fedorapeople.org/ssh2-php53.patch into a text file in that same ssh2 directory. Run:
    +patch -p0 < patchfilename+
    Now we can configure and make:
    +MACOSXDEPLOYMENTTARGET=10.6 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bindatload" ./configure+
    make
    +make test+
    +make install+
    It should install a nice ssh2.so file somewhere in /usr/lib/php/extensions/
    Now edit your /etc/php.ini file to include that directory for: extension_dir = /usr/lib/php/extensions/no-debug-non-zts-200xxxxxx
    Also add the line: extension=ssh2.so in there somewhere.
    Now restart apache:
    +apachectl graceful+
    And you're done. You might need to look at your phpinfo to make sure it's loaded, but Wordpress should now be happy. Hope this helps someone. Took me a few days to get it right and I may have forgotten all the steps. But this should work.
    Message was edited by: Demonhood

    I think I followed your instructions and got SSH2 PHP installed. Nothing seemed to go wrong (though I was sure at points my server was literally just going to start laughing at me for all the wonky steps!), and phpinfo lists ssh2 as being installed. Auto-update in Wordpress now lists SSH2 as an option. However, I can't get it to work, each time getting the error message saying "Failed to connect to SSH2 Server hostname.net:22. I've tried IP address, different hostnames, password, no password, listed where the public and private keys are (which i think I generated correctly with the "ssh-keygen -t dsa" command, but still nothing. Can ssh normally from outside of the firewall. Wondering if you had any suggestions, as you obviously know what you are talking about regarding php/ssh/wordpress!

  • How To Remove PHP Extension File Association With Internet Explorer

    When I select a PHP file to open it is redirected to be downloaded and opened (or I can choose to save) in Internet Explorer.  I need to test the file in different browsers.  How can I remove this automatic association?
    I've tried selecting a php file from Windows Explorer and selecting a different browser with no success.  I recently bought a new computer with Windows 8.  It's a big jump from my old one which used XP where there was no problem opening files with
    a php extension.
    Pat

    it sounds like you have a file association for .php, and, that you don't want to have one, so the original default behaviour would instead be preferable?
    This discussion, although for Win7, may be helpful:
    (the discussion occurs between "camelgrass" and "Brink")
    http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html#post259052
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Missing Features in PHP Extension

    Hello,
    The PHP extension is cool but, it is missing one thing. There isn't a design window. Sometimes I don't like to code HTML and it would be cool to have the design window so I can drag and drop html elements onto the page like what you can do with a JSP page. In the design window, Jdeveloper could put an icon in the place where the PHP code is just like it puts an icon in the place where there is a scriptlet on a JSP page.
    Chris

    JDeveloper certainly is certainly a fully featured IDE with good support for many web technologies. I agree it would be a good feature for the JDeveloper PHP Extension.
    Thanks for the feedback.

  • Specifing required php extensions for web application package

    Hello,
    is there a way to specify/auto-load required extensions in a web application package? Our application is needing the php_fileinfo and the php_opensll extension which are both not loaded by default and we preferred to save our users the hassle to add these by
    hand in their azure settings.
    We tried the .user.ini, which is not allowing extension loads.
    Setting the appSettings in web.config did not propagate, too.

    Hi jogoks,
    Did you want to enable the extensions and run it? I suggest you could try this
    How to: Customize the built-in PHP runtime . You may need add the extension information into 'php.ini' file.  
    Please try it. If I misunderstood, please let me know. 
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Compiling gettext extension for mod_php

    On this thread:
    http://discussions.apple.com/thread.jspa?messageID=10106396
    pterobyte listed some great instructions for downloading and recompiling the gettext extension for PHP. That's exactly what I need, so I followed the instructions and was able to compile and install the extension. However, when I restart Apache, the following not-so-helpful message appears in Apache's error_log:
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so, 9): image not found in Unknown on line 0
    If I examine the .so with file, it seems to be exactly what's expected:
    % file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gettext.so
    /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gettext.so: Mach-O universal binary with 2 architectures
    /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gettext.so (for architecture i386): Mach-O bundle i386
    /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gettext.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
    I don't have any other customizations in my Apache or PHP (and I really don't want to move to MacPorts, I had bad luck with it in the past).
    Has anybody had luck getting the gettext extension compiled on 10.6 ?

    It looks like you have the .so file under the wrong directory (or is it an old version?).
    PHP is trying to load /usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so (presumably because that's what you listed in php.ini), but the file you're looking at is /usr/local/lib/php/extensions/no-debug-non-zts-20060613/gettext.so. 20060613 looks like a date -- almost 4 years ago, so make sure you compiled the correct version.

  • Nginx with php-fpm, connection with php-fpm.sock failed

    I am feeling stumped, trying to setup NGINX for the first time on Arch. Followed the wiki a few times and keep getting hung up in the same spot. I followed the instructions to install NGINX in a chroot, then went on to setup php-fpm. I have not tried setting up any sites, just trying to get to the point of showing the "it works" page, before I moved to setting up a site.
    The error I am getting on the page
    Sorry, the page you are looking for is currently unavailable.
    Please try again later.
    error in log
    2013/03/07 13:04:05 [crit] 1868#0: *1 connect() to unix:/run/php-fpm/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: MYIP, server: SERVERIP, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "SERVERIP"
    SERVERIP: is the IP of the server and shows properly in the log, same with MYIP
    Here are my configs
    /srv/http/etc/nginx.conf
    #user http;
    worker_processes 1;
    #error_log logs/error.log;
    #error_log logs/error.log notice;
    #error_log logs/error.log info;
    #pid logs/nginx.pid;
    events {
    worker_connections 1024;
    http {
    include mime.types;
    default_type application/octet-stream;
    #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    # '$status $body_bytes_sent "$http_referer" '
    # '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log logs/access.log main;
    sendfile on;
    #tcp_nopush on;
    #keepalive_timeout 0;
    keepalive_timeout 65;
    #gzip on;
    server {
    listen 80;
    server_name SERVERIP;
    include fpm.conf;
    #charset koi8-r;
    #access_log logs/host.access.log main;
    location / {
    root /usr/share/nginx/html;
    index index.html index.htm;
    #error_page 404 /404.html;
    # redirect server error pages to the static page /50x.html
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/html;
    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #location ~ \.php$ {
    # proxy_pass http://127.0.0.1;
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #location ~ \.php$ {
    # root html;
    # fastcgi_pass 127.0.0.1:9000;
    # fastcgi_index index.php;
    # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
    # include fastcgi_params;
    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #location ~ /\.ht {
    # deny all;
    # another virtual host using mix of IP-, name-, and port-based configuration
    #server {
    # listen 8000;
    # listen somename:8080;
    # server_name somename alias another.alias;
    # location / {
    # root html;
    # index index.html index.htm;
    # HTTPS server
    #server {
    # listen 443;
    # server_name localhost;
    # ssl on;
    # ssl_certificate cert.pem;
    # ssl_certificate_key cert.key;
    # ssl_session_timeout 5m;
    # ssl_protocols SSLv2 SSLv3 TLSv1;
    # ssl_ciphers HIGH:!aNULL:!MD5;
    # ssl_prefer_server_ciphers on;
    # location / {
    # root html;
    # index index.html index.htm;
    /srv/http/etc/nginx/fpm.conf  - this is the file in the wiki that says php.conf
    location ~ \.(php|html|htm)$ {
    fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
    /etc/php/php-fpm.conf
    ; FPM Configuration ;
    ; All relative paths in this configuration file are relative to PHP's install
    ; prefix (/usr). This prefix can be dynamicaly changed by using the
    ; '-p' argument from the command line.
    ; Include one or more files. If glob(3) exists, it is used to include a bunch of
    ; files from a glob(3) pattern. This directive can be used everywhere in the
    ; file.
    ; Relative path can also be used. They will be prefixed by:
    ; - the global prefix if it's been set (-p arguement)
    ; - /usr otherwise
    ;include=/etc/php/fpm.d/*.conf
    ; Global Options ;
    [global]
    ; Pid file
    ; Note: the default prefix is /var
    ; Default Value: none
    pid = /run/php-fpm/php-fpm.pid
    ; Error log file
    ; If it's set to "syslog", log is sent to syslogd instead of being written
    ; in a local file.
    ; Note: the default prefix is /var
    ; Default Value: log/php-fpm.log
    ;error_log = log/php-fpm.log
    ; syslog_facility is used to specify what type of program is logging the
    ; message. This lets syslogd specify that messages from different facilities
    ; will be handled differently.
    ; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
    ; Default Value: daemon
    ;syslog.facility = daemon
    ; syslog_ident is prepended to every message. If you have multiple FPM
    ; instances running on the same server, you can change the default value
    ; which must suit common needs.
    ; Default Value: php-fpm
    ;syslog.ident = php-fpm
    ; Log level
    ; Possible Values: alert, error, warning, notice, debug
    ; Default Value: notice
    ;log_level = notice
    ; If this number of child processes exit with SIGSEGV or SIGBUS within the time
    ; interval set by emergency_restart_interval then FPM will restart. A value
    ; of '0' means 'Off'.
    ; Default Value: 0
    ;emergency_restart_threshold = 0
    ; Interval of time used by emergency_restart_interval to determine when
    ; a graceful restart will be initiated. This can be useful to work around
    ; accidental corruptions in an accelerator's shared memory.
    ; Available Units: s(econds), m(inutes), h(ours), or d(ays)
    ; Default Unit: seconds
    ; Default Value: 0
    ;emergency_restart_interval = 0
    ; Time limit for child processes to wait for a reaction on signals from master.
    ; Available units: s(econds), m(inutes), h(ours), or d(ays)
    ; Default Unit: seconds
    ; Default Value: 0
    ;process_control_timeout = 0
    ; The maximum number of processes FPM will fork. This has been design to control
    ; the global number of processes when using dynamic PM within a lot of pools.
    ; Use it with caution.
    ; Note: A value of 0 indicates no limit
    ; Default Value: 0
    ; process.max = 128
    ; Specify the nice(2) priority to apply to the master process (only if set)
    ; The value can vary from -19 (highest priority) to 20 (lower priority)
    ; Note: - It will only work if the FPM master process is launched as root
    ; - The pool process will inherit the master process priority
    ; unless it specified otherwise
    ; Default Value: no set
    ; process.priority = -19
    ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
    ; Default Value: yes
    ;daemonize = yes
    ; Set open file descriptor rlimit for the master process.
    ; Default Value: system defined value
    ;rlimit_files = 1024
    ; Set max core size rlimit for the master process.
    ; Possible Values: 'unlimited' or an integer greater or equal to 0
    ; Default Value: system defined value
    ;rlimit_core = 0
    ; Specify the event mechanism FPM will use. The following is available:
    ; - select (any POSIX os)
    ; - poll (any POSIX os)
    ; - epoll (linux >= 2.5.44)
    ; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
    ; - /dev/poll (Solaris >= 7)
    ; - port (Solaris >= 10)
    ; Default Value: not set (auto detection)
    ; events.mechanism = epoll
    ; Pool Definitions ;
    ; Multiple pools of child processes may be started with different listening
    ; ports and different management options. The name of the pool will be
    ; used in logs and stats. There is no limitation on the number of pools which
    ; FPM can handle. Your system will tell you anyway :)
    ; Start a new pool named 'www'.
    ; the variable $pool can we used in any directive and will be replaced by the
    ; pool name ('www' here)
    [www]
    ; Per pool prefix
    ; It only applies on the following directives:
    ; - 'slowlog'
    ; - 'listen' (unixsocket)
    ; - 'chroot'
    ; - 'chdir'
    ; - 'php_values'
    ; - 'php_admin_values'
    ; When not set, the global prefix (or /usr) applies instead.
    ; Note: This directive can also be relative to the global prefix.
    ; Default Value: none
    ;prefix = /path/to/pools/$pool
    ; Unix user/group of processes
    ; Note: The user is mandatory. If the group is not set, the default user's group
    ; will be used.
    user = http
    group = http
    ; The address on which to accept FastCGI requests.
    ; Valid syntaxes are:
    ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
    ; a specific port;
    ; 'port' - to listen on a TCP socket to all addresses on a
    ; specific port;
    ; '/path/to/unix/socket' - to listen on a unix socket.
    ; Note: This value is mandatory.
    ;listen = 127.0.0.1:9000
    listen = /run/php-fpm/php-fpm.sock
    ; Set listen(2) backlog.
    ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
    ;listen.backlog = 128
    ; Set permissions for unix socket, if one is used. In Linux, read/write
    ; permissions must be set in order to allow connections from a web server. Many
    ; BSD-derived systems allow connections regardless of permissions.
    ; Default Values: user and group are set as the running user
    ; mode is set to 0666
    listen.owner = http
    listen.group = http
    listen.mode = 0666
    ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
    ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
    ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
    ; must be separated by a comma. If this value is left blank, connections will be
    ; accepted from any ip address.
    ; Default Value: any
    ;listen.allowed_clients = 127.0.0.1
    ; Specify the nice(2) priority to apply to the pool processes (only if set)
    ; The value can vary from -19 (highest priority) to 20 (lower priority)
    ; Note: - It will only work if the FPM master process is launched as root
    ; - The pool processes will inherit the master process priority
    ; unless it specified otherwise
    ; Default Value: no set
    ; priority = -19
    ; Choose how the process manager will control the number of child processes.
    ; Possible Values:
    ; static - a fixed number (pm.max_children) of child processes;
    ; dynamic - the number of child processes are set dynamically based on the
    ; following directives. With this process management, there will be
    ; always at least 1 children.
    ; pm.max_children - the maximum number of children that can
    ; be alive at the same time.
    ; pm.start_servers - the number of children created on startup.
    ; pm.min_spare_servers - the minimum number of children in 'idle'
    ; state (waiting to process). If the number
    ; of 'idle' processes is less than this
    ; number then some children will be created.
    ; pm.max_spare_servers - the maximum number of children in 'idle'
    ; state (waiting to process). If the number
    ; of 'idle' processes is greater than this
    ; number then some children will be killed.
    ; ondemand - no children are created at startup. Children will be forked when
    ; new requests will connect. The following parameter are used:
    ; pm.max_children - the maximum number of children that
    ; can be alive at the same time.
    ; pm.process_idle_timeout - The number of seconds after which
    ; an idle process will be killed.
    ; Note: This value is mandatory.
    pm = dynamic
    ; The number of child processes to be created when pm is set to 'static' and the
    ; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
    ; This value sets the limit on the number of simultaneous requests that will be
    ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
    ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
    ; CGI. The below defaults are based on a server without much resources. Don't
    ; forget to tweak pm.* to fit your needs.
    ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
    ; Note: This value is mandatory.
    pm.max_children = 5
    ; The number of child processes created on startup.
    ; Note: Used only when pm is set to 'dynamic'
    ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    pm.start_servers = 2
    ; The desired minimum number of idle server processes.
    ; Note: Used only when pm is set to 'dynamic'
    ; Note: Mandatory when pm is set to 'dynamic'
    pm.min_spare_servers = 1
    ; The desired maximum number of idle server processes.
    ; Note: Used only when pm is set to 'dynamic'
    ; Note: Mandatory when pm is set to 'dynamic'
    pm.max_spare_servers = 3
    ; The number of seconds after which an idle process will be killed.
    ; Note: Used only when pm is set to 'ondemand'
    ; Default Value: 10s
    ;pm.process_idle_timeout = 10s;
    ; The number of requests each child process should execute before respawning.
    ; This can be useful to work around memory leaks in 3rd party libraries. For
    ; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
    ; Default Value: 0
    ;pm.max_requests = 500
    ; The URI to view the FPM status page. If this value is not set, no URI will be
    ; recognized as a status page. It shows the following informations:
    ; pool - the name of the pool;
    ; process manager - static, dynamic or ondemand;
    ; start time - the date and time FPM has started;
    ; start since - number of seconds since FPM has started;
    ; accepted conn - the number of request accepted by the pool;
    ; listen queue - the number of request in the queue of pending
    ; connections (see backlog in listen(2));
    ; max listen queue - the maximum number of requests in the queue
    ; of pending connections since FPM has started;
    ; listen queue len - the size of the socket queue of pending connections;
    ; idle processes - the number of idle processes;
    ; active processes - the number of active processes;
    ; total processes - the number of idle + active processes;
    ; max active processes - the maximum number of active processes since FPM
    ; has started;
    ; max children reached - number of times, the process limit has been reached,
    ; when pm tries to start more children (works only for
    ; pm 'dynamic' and 'ondemand');
    ; Value are updated in real time.
    ; Example output:
    ; pool: www
    ; process manager: static
    ; start time: 01/Jul/2011:17:53:49 +0200
    ; start since: 62636
    ; accepted conn: 190460
    ; listen queue: 0
    ; max listen queue: 1
    ; listen queue len: 42
    ; idle processes: 4
    ; active processes: 11
    ; total processes: 15
    ; max active processes: 12
    ; max children reached: 0
    ; By default the status page output is formatted as text/plain. Passing either
    ; 'html', 'xml' or 'json' in the query string will return the corresponding
    ; output syntax. Example:
    ; http://www.foo.bar/status
    ; http://www.foo.bar/status?json
    ; http://www.foo.bar/status?html
    ; http://www.foo.bar/status?xml
    ; By default the status page only outputs short status. Passing 'full' in the
    ; query string will also return status for each pool process.
    ; Example:
    ; http://www.foo.bar/status?full
    ; http://www.foo.bar/status?json&full
    ; http://www.foo.bar/status?html&full
    ; http://www.foo.bar/status?xml&full
    ; The Full status returns for each process:
    ; pid - the PID of the process;
    ; state - the state of the process (Idle, Running, ...);
    ; start time - the date and time the process has started;
    ; start since - the number of seconds since the process has started;
    ; requests - the number of requests the process has served;
    ; request duration - the duration in µs of the requests;
    ; request method - the request method (GET, POST, ...);
    ; request URI - the request URI with the query string;
    ; content length - the content length of the request (only with POST);
    ; user - the user (PHP_AUTH_USER) (or '-' if not set);
    ; script - the main script called (or '-' if not set);
    ; last request cpu - the %cpu the last request consumed
    ; it's always 0 if the process is not in Idle state
    ; because CPU calculation is done when the request
    ; processing has terminated;
    ; last request memory - the max amount of memory the last request consumed
    ; it's always 0 if the process is not in Idle state
    ; because memory calculation is done when the request
    ; processing has terminated;
    ; If the process is in Idle state, then informations are related to the
    ; last request the process has served. Otherwise informations are related to
    ; the current request being served.
    ; Example output:
    ; pid: 31330
    ; state: Running
    ; start time: 01/Jul/2011:17:53:49 +0200
    ; start since: 63087
    ; requests: 12808
    ; request duration: 1250261
    ; request method: GET
    ; request URI: /test_mem.php?N=10000
    ; content length: 0
    ; user: -
    ; script: /home/fat/web/docs/php/test_mem.php
    ; last request cpu: 0.00
    ; last request memory: 0
    ; Note: There is a real-time FPM status monitoring sample web page available
    ; It's available in: ${prefix}/share/fpm/status.html
    ; Note: The value must start with a leading slash (/). The value can be
    ; anything, but it may not be a good idea to use the .php extension or it
    ; may conflict with a real PHP file.
    ; Default Value: not set
    ;pm.status_path = /status
    ; The ping URI to call the monitoring page of FPM. If this value is not set, no
    ; URI will be recognized as a ping page. This could be used to test from outside
    ; that FPM is alive and responding, or to
    ; - create a graph of FPM availability (rrd or such);
    ; - remove a server from a group if it is not responding (load balancing);
    ; - trigger alerts for the operating team (24/7).
    ; Note: The value must start with a leading slash (/). The value can be
    ; anything, but it may not be a good idea to use the .php extension or it
    ; may conflict with a real PHP file.
    ; Default Value: not set
    ;ping.path = /ping
    ; This directive may be used to customize the response of a ping request. The
    ; response is formatted as text/plain with a 200 response code.
    ; Default Value: pong
    ;ping.response = pong
    ; The access log file
    ; Default: not set
    ;access.log = log/$pool.access.log
    ; The access log format.
    ; The following syntax is allowed
    ; %%: the '%' character
    ; %C: %CPU used by the request
    ; it can accept the following format:
    ; - %{user}C for user CPU only
    ; - %{system}C for system CPU only
    ; - %{total}C for user + system CPU (default)
    ; %d: time taken to serve the request
    ; it can accept the following format:
    ; - %{seconds}d (default)
    ; - %{miliseconds}d
    ; - %{mili}d
    ; - %{microseconds}d
    ; - %{micro}d
    ; %e: an environment variable (same as $_ENV or $_SERVER)
    ; it must be associated with embraces to specify the name of the env
    ; variable. Some exemples:
    ; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
    ; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
    ; %f: script filename
    ; %l: content-length of the request (for POST request only)
    ; %m: request method
    ; %M: peak of memory allocated by PHP
    ; it can accept the following format:
    ; - %{bytes}M (default)
    ; - %{kilobytes}M
    ; - %{kilo}M
    ; - %{megabytes}M
    ; - %{mega}M
    ; %n: pool name
    ; %o: ouput header
    ; it must be associated with embraces to specify the name of the header:
    ; - %{Content-Type}o
    ; - %{X-Powered-By}o
    ; - %{Transfert-Encoding}o
    ; %p: PID of the child that serviced the request
    ; %P: PID of the parent of the child that serviced the request
    ; %q: the query string
    ; %Q: the '?' character if query string exists
    ; %r: the request URI (without the query string, see %q and %Q)
    ; %R: remote IP address
    ; %s: status (response code)
    ; %t: server time the request was received
    ; it can accept a strftime(3) format:
    ; %d/%b/%Y:%H:%M:%S %z (default)
    ; %T: time the log has been written (the request has finished)
    ; it can accept a strftime(3) format:
    ; %d/%b/%Y:%H:%M:%S %z (default)
    ; %u: remote user
    ; Default: "%R - %u %t \"%m %r\" %s"
    ;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
    ; The log file for slow requests
    ; Default Value: not set
    ; Note: slowlog is mandatory if request_slowlog_timeout is set
    ;slowlog = log/$pool.log.slow
    ; The timeout for serving a single request after which a PHP backtrace will be
    ; dumped to the 'slowlog' file. A value of '0s' means 'off'.
    ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
    ; Default Value: 0
    ;request_slowlog_timeout = 0
    ; The timeout for serving a single request after which the worker process will
    ; be killed. This option should be used when the 'max_execution_time' ini option
    ; does not stop script execution for some reason. A value of '0' means 'off'.
    ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
    ; Default Value: 0
    ;request_terminate_timeout = 0
    ; Set open file descriptor rlimit.
    ; Default Value: system defined value
    ;rlimit_files = 1024
    ; Set max core size rlimit.
    ; Possible Values: 'unlimited' or an integer greater or equal to 0
    ; Default Value: system defined value
    ;rlimit_core = 0
    ; Chroot to this directory at the start. This value must be defined as an
    ; absolute path. When this value is not set, chroot is not used.
    ; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
    ; of its subdirectories. If the pool prefix is not set, the global prefix
    ; will be used instead.
    ; Note: chrooting is a great security feature and should be used whenever
    ; possible. However, all PHP paths will be relative to the chroot
    ; (error_log, sessions.save_path, ...).
    ; Default Value: not set
    ;chroot =
    ; Chdir to this directory at the start.
    ; Note: relative path can be used.
    ; Default Value: current directory or / when chroot
    ;chdir = /srv/http
    ; Redirect worker stdout and stderr into main error log. If not set, stdout and
    ; stderr will be redirected to /dev/null according to FastCGI specs.
    ; Note: on highloaded environement, this can cause some delay in the page
    ; process time (several ms).
    ; Default Value: no
    ;catch_workers_output = yes
    ; Limits the extensions of the main script FPM will allow to parse. This can
    ; prevent configuration mistakes on the web server side. You should only limit
    ; FPM to .php extensions to prevent malicious users to use other extensions to
    ; exectute php code.
    ; Note: set an empty value to allow all extensions.
    ; Default Value: .php
    ;security.limit_extensions = .php .php3 .php4 .php5
    security.limit_extensions = .php .html
    ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
    ; the current environment.
    ; Default Value: clean env
    ;env[HOSTNAME] = $HOSTNAME
    ;env[PATH] = /usr/local/bin:/usr/bin:/bin
    ;env[TMP] = /tmp
    ;env[TMPDIR] = /tmp
    ;env[TEMP] = /tmp
    ; Additional php.ini defines, specific to this pool of workers. These settings
    ; overwrite the values previously defined in the php.ini. The directives are the
    ; same as the PHP SAPI:
    ; php_value/php_flag - you can set classic ini defines which can
    ; be overwritten from PHP call 'ini_set'.
    ; php_admin_value/php_admin_flag - these directives won't be overwritten by
    ; PHP call 'ini_set'
    ; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
    ; Defining 'extension' will load the corresponding shared extension from
    ; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
    ; overwrite previously defined php.ini values, but will append the new value
    ; instead.
    ; Note: path INI options can be relative and will be expanded with the prefix
    ; (pool, global or /usr)
    ; Default Value: nothing is defined by default except the values in php.ini and
    ; specified at startup with the -d argument
    ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f [email protected]
    ;php_flag[display_errors] = off
    ;php_admin_value[error_log] = /var/log/fpm-php.www.log
    ;php_admin_flag[log_errors] = on
    ;php_admin_value[memory_limit] = 32M
    In php-fpm.conf I have modified the permissions to be 0666 and I am still hitting the no such file or directory. But it is created.
    ls -la /run/php-fpm/
    total 4
    drwxr-xr-x 2 root root 80 Mar 7 13:05 .
    drwxr-xr-x 17 root root 520 Mar 7 10:59 ..
    -rw-r--r-- 1 root root 4 Mar 7 13:05 php-fpm.pid
    srw-rw-rw- 1 http http 0 Mar 7 13:05 php-fpm.sock
    Not getting what I am missing here, can someone help shed some light or smack me in the correct direction. Thanks.
    edit:
    Also verified that it is for sure running in the chroot
    ps -C nginx | awk '{print $1}' | sed 1d | while read -r PID; do ls -l /proc/$PID/root; done
    lrwxrwxrwx 1 root root 0 Mar 7 14:06 /proc/313/root -> /srv/http
    lrwxrwxrwx 1 http http 0 Mar 7 14:06 /proc/314/root -> /srv/http
    edit2:
    I just rebooted the box and was going over everything again to see if I missed anything or anything was not matching the wiki and the only extra info I could dig out of my box was new error in the logs relating to the nginx.pid
    2013/03/07 18:10:41 [notice] 411#0: signal process started
    2013/03/07 18:10:41 [alert] 387#0: unlink() "/run/nginx.pid" failed (13: Permission denied)
    ls -la /srv/http/run/
    total 12
    drwxr-xr-x 2 root root 4096 Mar 7 14:02 .
    d--x--x--x 9 root root 4096 Mar 7 11:07 ..
    -rw-r--r-- 1 http http 4 Mar 7 18:12 nginx.pid
    It appears to have the proper permissions and it is not in /run/
    ls -la /run/nginx.pid
    ls: cannot access /run/nginx.pid: No such file or directory
    Going to try setting it up again on another box to see if I catch what I did wrong on this one, but will be leaving this one as is to make sure I figure out what happened. Is it that my chroot is bad? That is really the only thing I can think of that is really any different than other NGINX installs I have done, which have always been on a Debian based system.
    Last edited by vwyodajl (2013-03-07 18:24:55)

    Might sound stupid, but do you have php-fpm running?
    Means, is there a php-fpm process on your box, and does the socket exist like in:
    └» ps -ef|grep php-fpm
    root 3045 1 0 Mär04 ? 00:00:09 php-fpm: master process (/etc/php/php-fpm.conf)
    http 13534 3045 0 18:22 ? 00:00:10 php-fpm: pool www
    http 13545 3045 0 18:22 ? 00:00:08 php-fpm: pool www
    http 22807 3045 0 19:46 ? 00:00:01 php-fpm: pool www
    tom 27863 28055 0 20:16 pts/1 00:00:00 grep --colour=auto php-fpm
    └» ls -l /run/php-fpm/php-fpm.sock
    srw-rw---- 1 http http 0 4. Mär 22:24 /run/php-fpm/php-fpm.sock
    EDIT: somehow missed your output regarding the php-fpm socket. Ignore above then, I have no idea about chroot, I use LXC.
    Last edited by teekay (2013-03-07 19:24:04)

  • Trouble Compiling CUPS 1.4.1 via ABS

    I've recompiled all but a few packages on my system, and am now trying to compile CUPS 1.4.1 from the extra repo.  Its compilation always errors on me with messages stating it cannot find various header files, php.h, php_ini.h, and ext/standard/info.h in particular.  Looking at the source file having issues, phpcups.c, it has those headers included as, please excuse me if my terminology is incorrect, local header files:
    #include "php.h"
    #include "php_ini.h"
    #include "ext/standard/info.h"
    The problem is, those headers are located in /usr/include/php, not where I'm compiling CUPS.  Changing their lines to point to the correct locations of each (i.e. #include <php/main/php.h>) causes the compiler to complain about yet more header files that cannot be located, however the problematic header files are then referenced from within the list of PHP header files, not those belonging to CUPS.  What I thought about doing was fixing the locations of each include in the PHP header files, and the three in the CUPS header files, but was unsure how that would affect linking and compiling.
    I copied the PHP headers to a temporary directory, where I ran this set of commands to fix their includes:
    for header in $(grep -rE '#include (<[^>]*>|"[^"]*")' . | sed -e 's|^.*:#include\s\+||g;s/"//g;s/<//g;s/>//g' -e 's|\s\+.*$||g;/:/d' -e 's|.*/||g' | sort | uniq); do loc=$(find . -name ${header} | sed -e 's|^\./||g'); if [[ -n "$loc" ]]; then sed -e "s|^#include \"[^\"]*${header}\"|#include \"${loc}\"|g" $(for f in $(find . -type f); do echo " -i $f "; done); fi; done
    (There may be a cleaner way, but this was how I fixed them)
    I then ran diff -ru /usr/include/php . to check what was changed, and found, with a few exceptions, I was successful.  If I were to carefully merge the changes back into the original header files, would this approach work?

    bump
    Has anybody compiled CUPS 1.4.1 with the ABS?
    EDIT: Well, I reckon someone did, since it's in the extra repo, but how was it done?
    Last edited by deltaecho (2009-10-24 22:02:34)

  • DW CS5 with PHP: no "register_long_arrays" in php.ini

    Mr. Powers:  I bought your book, “Adobe DW CS5 with PHP: Training from the Source.” I am running MAMP Pro 1.9.6 on a Mac Pro Intel, OS 10.6.8. Following your instructions in Chapter 2, I have changed ALL the settings per Table 2.1, EXCEPT “register_long_arrays” which I cannot find (searched every permutation in BBEdit) in either of the php.ini files listed. The php info v. 5.2.17 shows:
    Configuration File (php.ini) Path: /Applications/MAMP/conf/php5.2
    Loaded Configuration File: /Library/Application Support/appsolute/MAMP Pro/conf/php.ini
    and the “PHP Core” section shows “register_long_arrays” = On.
    Why can’t I find the setting in either php.ini file? Also, I have read that this setting has been deprecated in PHP 5.3; what does that mean to my configuration?
    You recommend matching certain settings to the host’s server configuration; it would be very useful in avoiding potential problems to have a complete list of these configuration/parameter recommendations for a prospective host, don’t you think?

    Thank you, SnakEyez02. At this point, I haven't gotten far enough to understand super-globals but I'm grateful for your help. After much head-banging, I believe the solution to my problem lies on this forum [ Re: Snow Leopard, MAMP php.ini Question ]. Though Mr. Powers recommends using MAMP Pro in the book, he doesn’t mention that changes made to settings in /Library/Application Support/appsolute/MAMP Pro/conf/php.ini are NOT LOADED and not reflected in the phpinfo.php file at subsequent server startups as they would be if I were using MAMP (not PRO).  In order for the settings changes to be loaded by MAMP Pro, editing must be done through the MAMP Pro interface menu /File/Edit Template/PHP 5.2.13 php.ini.
    Having opened that template, I'm now faced with a another unforeseen question:  what to do with
    [setting]  =  MAMP_error_reporting_MAMP
    when the book says that setting should be either “= On” or “= Off.”  If you can help me with this one, you’ll make my week!

  • Trouble Compiling my Email-client

    Hi
    I have written this email -client, but have some trouble compiling it !
    Then I try to compile it the following errors:
    MailClient.java:350: <identifier> expected
    public syncronize void mails(String t){
    ^
    MailClient.java:727: ';' expected
    private class myWindowListener extends WindowAdapter{
    ^
    MailClient.java:747: '}' expected
    3 errors.
    What do I need to change to correct these errors ?
    I hope that there is somebody out there who can help me get my program to work.
    Thanks in advance.
    Sincrely Yours
    Fred
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class MailClient extends JFrame implements ActionListener{ 
    private Sendman mySendman;
    private Letterman myLetterman;
    public Writer myWrite;
    public Reader myReader;
    public Composer myComposer;
    private Setup mySetup;
    public Addressbook myAdressbook;
    private FixTask myFixTask;
    private Filter myFilter;
    private Info myInfo;
    public Vector mailIndexVector = new Vector();
    public Vector filterIndexVector = new Vector();
    public Vector folderVector = new Vector();
    private JPanel tArea, trae, icon, tField;
    private JTextArea ta;
    private JScrollPane view, treeScroll;
    private JTree tree;
    public JTextField tf;
    private JSplitPane split;
    private Dimension Size;
    private MailClient myMailClient;
    private String mailBody, subject, from;
    public boolean fromOutbox = false;
    public boolean viewSource = false;
    public static void main (String[] args) {
         MailClient myMailClient = new MailClient();
    public MailClient() {
         super("Mail-Client");
         ImageIcon linux = new ImageIcon("linux.gif");
         this.setIconImage(linux.getImage());
         icon = new JPanel();
         icon.setLayout(new FlowLayout(FlowLayout.LEFT));
         ImageIcon neu = new ImageIcon("getmail.gif");
         JButton neueMails = new JButton(neu);
         newMails.setActionCommand("Getting new Mails");
         newMails.addActionListener(this);
         newMails.setBorderPainted(false);
         newMails.setToolTipText("Getting new Mails");
         ImageIcon cr = new ImageIcon("creator.gif");
         JButton creator = new JButton(cr);
         creator.setActionCommand("Creator open");
         creator.addActionListener(this);
         creator.setBorderPainted(false);
         creator.setToolTipText("Creator open");
         JButton rep = new JButton(new ImageIcon("reply.gif"));
         rep.setActionCommand("rep");
         rep.addActionListener(this);
         rep.setBorderPainted(false);
         rep.setToolTipText("Reply");
         JButton fwd = new JButton(new ImageIcon("fwd.gif"));
         fwd.setActionCommand("fwd");
         fwd.addActionListener(this);
         fwd.setBorderPainted(false);
         fwd.setToolTipText("Forward");
         JButton ein = new JButton(new ImageIcon("settings.gif"));
         ein.setActionCommand("settings open");
         ein.addActionListener(this);
         ein.setBorderPainted(false);
    ein.setToolTipText("Setting open");
    JButton adr = new JButton(new ImageIcon("adressbook.gif"));
    adr.setActionCommand("adr");
    adr.addActionListener(this);
    adr.setBorderPainted(false);
    adr.setToolTipText("Addressbook");
    JButton lo = new JButton(new ImageIcon("trash.gif"));
    lo.setActionCommand("trash");
    lo.addActionListener(this);
    lo.setBorderPainted(false);
    lo.setToolTipText("trash");
    JButton in = new JButton(new ImageIcon("info.gif"));
    in.setActionCommand("Information");
    in.addActionListener(this);
    in.setBorderPainted(false);
    in.setToolTipText("Information");
    icon.add(newMails);
    icon.add(creator);
    icon.add(rep);
    icon.add(fwd);
    icon.add(set);
    icon.add(adr);
    icon.add(lo);
    icon.add(in);
    Vector h1 = myLeser.lese("Summary.4on");
    for(int i=0; i<h1.size(); i+=7){
    String id = h1.elementAt(i).toString();
    String fo = h1.elementAt(i+1).toString();
    String su = h1.elementAt(i+2).toString();
    String fr = h1.elementAt(i+3).toString();
    String to = h1.elementAt(i+4).toString();
    String da = h1.elementAt(i+5).toString();
    String re = h1.elementAt(i+6).toString();
    MailIndex index = new MailIndex(id, fo, su, fr, to, da, re);
    mailIndexVector.addElement(index);
    Vector h2 = myReader.read("Filter.4on");
    for(int j=0; j<h2.size(); j+=3){
    String fo = h2.elementAt(j).toString();
    String from = h2.elementAt(j+1).toString();
    String te = h2.elementAt(j+2).toString();
    FilterIndex index = new FilterIndex(fo, from, te);
    filterIndexVector.addElement(index);
    folderVector = myReader.read("Folder.4on");
    DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
    top = new DefaultMutableTreeNode("mails");
    top.add(inbox = new DefaultMutableTreeNode("Inbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Inbox"))
         inbox.add(new DefaultMutableTreeNode(m));
    top.add(outbox = new DefaultMutableTreeNode("Outbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Outbox")){
         outbox.add(new DefaultMutableTreeNode(m));
    top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Sentbox"))
         sentbox.add(new DefaultMutableTreeNode(m));
    for(int j=0; j<folderVector.size(); j++){
    top.add(trash =
         new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
    for(int i=0; i<mailIndexVector.size(); i++){
         MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
         if (m.folder.equals(folderVector.elementAt(j).toString()))
         trash.add(new DefaultMutableTreeNode(m));
    tree = new JTree(top);
    tree.getSelectionModel().setSelectionMode
    (TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.addTreeSelectionListener(new myTreeSelectionListener());
    treeScroll = new JScrollPane(tree);
    treeScroll.setFont(new Font("Monospaced",Font.PLAIN,6));
    baum.add("Center", treeScroll);
    MainMenu menuBar = new MainMenu(this, this);
    setJMenuBar(menuBar);
    setVisible(true);
    public void mailsFetcher() {
    myLetterman = new Letterman(this, mySetup);
    myLetterman.start();
    public void treeNewSign(){
    trae.remove(treeScroll);     
    DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
    top = new DefaultMutableTreeNode("mails");
    top.add(inbox = new DefaultMutableTreeNode("Inbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Inbox"))
         inbox.add(new DefaultMutableTreeNode(m));
    top.add(outbox = new DefaultMutableTreeNode("Outbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Outbox"))
         outbox.add(new DefaultMutableTreeNode(m));
    top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
    for(int i=0; i<mailIndexVector.size(); i++){
    MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
    if (m.folder.equals("Sentbox"))
         sentbox.add(new DefaultMutableTreeNode(m));
    for(int j=0; j<folderVector.size(); j++){
    top.add(trash =
         new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
    for(int i=0; i<mailIndexVector.size(); i++){
         MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
         if (m.folder.equals(folderVector.elementAt(j).toString()))
         trash.add(new DefaultMutableTreeNode(m));
    tree = new JTree(top);
    tree.getSelectionModel().setSelectionMode
    (TreeSelectionModel.SINGLE_TREE_SELECTION);
    tree.addTreeSelectionListener(new myTreeSelectionListener());
    treeScroll = new JScrollPane(tree);
    trae.add("Center", treeScroll);
    trae.repaint();
    setVisible(true);
    public void menuNewSign(){
    setJMenuBar(new MainMenu(this, this));
    setVisible(true);
    public String fromFilter (String t){
    String myFrom = "";
    int start, end;
    int a = t.indexOf("From:");
    if (a != -1){
    start = a + 6;
    ende = t.indexOf("\n",start);
    myFrom = t.substring(start,end);
    return myFrom;
    public String toFilter (String t){
    String myTo = "";
    int start, e1, e2, end;
    int a = t.indexOf("To:");
    if (a != -1){
    start = a + 4;
    end = t.indexOf("\n",start);
    myTo = t.substring(start,end);
    e1 = end + 1;
    if(t.substring(e1,e1+1).equals(" ")){
         while(t.substring(e1,e1+1).equals(" ")){
         while(t.substring(e1,e1+1).equals(" "))
         e1++;
         e2 = t.indexOf("\n",e1);
         myTo += " " + t.substring(e1,e2);
         e1 = e2 + 1;
    return myTo;
    public String dateFilter (String t){
    String myDate = "";
    int start, end;
    int a = t.indexOf("Date:");
    if (a != -1){
    start = a + 6;
    end = t.indexOf("\n",start);
    myDate = t.substring(start,end);
    return myDate;
    public String subjectFilter (String t){
    String mySubject = "";
    int start, end;
    int a = t.indexOf("Subject:");
    if (a != -1){
    start = a + 9;
    end = t.indexOf("\n",start);
    mySubject = t.substring(start,end);
    return mySubject;
    public String mailFilter (String t){ 
    String myMail = "";
    int start = 0, end = t.length();
    start = t.indexOf("\n\n") + 2;
    if (start != 1){
    int a = t.indexOf("\n\n" ,start);
    if (a != -1){
         if (t.indexOf(".",a+2) == a+2)
         if (t.indexOf("\n",a+3) == a+3)
         start = a;
    myMail = t.substring(start,end);
    return myMail;
    public void mailsRemark(String file){
    String mail = "", t = "";
    Vector mailVector = myReader.read(file);
    for (int i=0; i<mailVector.size(); i++)
    t += (String)mailVector.elementAt(i) + "\n";
    from = fromFilter(t);
    subject = subjectFilter(t);
    mailBody = mailFilter(t);
    mail += "Subject: " + subject + "\n";
    mail += "Date: " + dateFilter(t) + "\n";
    mail += "From: " + from + "\n";
    mail += "To: " + toFilter(t) + "\n";
    mail += "\n" + mailBody;
    if(viewSource == true)
    ta.setText(t);
    else
    ta.setText(mail);
    public syncronize void mails(String t){
    Status myStatus = new Status(this,t);
    myStatus.start();
    public void delete(){
    if(tree.getLastSelectedPathComponent() != null){
    DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
    if(node.isLeaf()){
         Object nodeInfo = node.getUserObject();
         if(nodeInfo instanceof MailIndex){
         MailIndex index = (MailIndex)nodeInfo;
         mailIndexVector.removeElement(index);
         int count = 0;
         for(int j=0; j<mailIndexVector.size(); j++){
         MailIndex index1 = (MailIndex)mailIndexVector.elementAt(j);
         String id = index1.mailId;
         if(id.equals(index.mailId))
         count++;
         if(count == 0){
         File home = new File(".");
         String mailsRemark = "." + home.separator + "data";
         File datei = new File(mailsRemark, index.mailId);
         datei.delete();
         treeNewSign();
         menuNewSign();
         else{
         String t = (String)nodeInfo;
         boolean toDelete = false;
         for (int i=0; i<folderVector.size(); i++){
         if(folderVector.elementAt(i).equals(t)){
         folderVector.removeElement(t);
         konnteLoeschen = true;
         if(toDelete == false){
         message("This folder can not be deleted!");
         treeNewSign();
    else
         message("Folder is not Empty! Please delete Your mails.");
    else
    message("No Mails where selected to be deleted!");
    public void forward(){
    if(from != null){
    creatorOeffnen();
    myCreator.tfSb.setText("Fwd to: " + subject);
    myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                   "\n\n>\n>\n\n");
    public void reply(){
    if(from != null){
    creatorOeffnen();
    myCreator.tfTo.setText(from);
    myCreator.tfSb.setText("Reply to: " + subject);
    myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                   "\n\n>\n>\n\n");
    public void end(){
    String h = "";
    for (int i=0; i<mailIndexVector.size(); i++){
    MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
    h += index.mailId + "\n";
    h += index.folder + "\n";
    h += index.subject + "\n";
    h += index.from + "\n";
    h += index.to + "\n";
    h += index.date + "\n";
    h += index.read + "\n";
    myWriter.writer(h,"Summary.4on");
    String w = "";
    for (int l=0; l<filterIndexVector.size(); l++){
    FilterIndex index = (FilterIndex)filterIndexVector.elementAt(l);
    w += index.folder + "\n";
    w += index.from + "\n";
    w += index.text + "\n";
    myWriter.write(w,"Filter.4on");
    String k = "";
    for(int j=0; j<folderVector.size(); j++)
    k += folderVector.elementAt(j).toString() + "\n";
    myWriter.writer(k,"Folder.4on");
    String t = "";
    for (int l=0; l<myAddressBook.addressIndexVector.size(); l++){
    AddressIndex aindex =
         (AddressIndex)myAdressBook.adressIndexVector.elementAt(l);
    t += aindex.alias + "\n";
    t += aindex.email + "\n";
    myWriter.write(t,"Address.4on");
    setVisible(false);
    dispose();
    System.exit(0);
    public void filterOpen(){
    boolean test = false;
    if(tree.getLastSelectedPathComponent() != null){
    DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
    Object nodeInfo = node.getUserObject();
    if(nodeInfo instanceof String){
         myFilter.folder = (String)nodeInfo;
         for(int i=0; i<filterIndexVector.size(); i++){
         FilterIndex h = (FilterIndex)filterIndexVector.elementAt(i);
         if(h.folder.equals(nodeInfo)){
         myFilter.index = h;
         test = true;
         if(h.from.equals("")){
         myFilter.box1 = false;
         myFilter.fTf.setText("");
         myFilter.fBox.setSelected(false);
         myFilter.fTf.setEditable(false);
         else{
         myFilter.box1 = true;
         myFilter.fTf.setText(h.from);
         myFilter.fBox.setSelected(true);
         myFilter.fTf.setEditable(true);
         if(h.text.equals("")){
         myFilter.box2 = false;
         myFilter.tTf.setText("");
         myFilter.tBox.setSelected(false);
         myFilter.tTf.setEditable(false);
         else{
         myFilter.box2 = true;
         myFilter.tTf.setText(h.text);
         myFilter.tBox.setSelected(true);
         myFilter.tTf.setEditable(true);
         break;
    myFilter.setVisible(true);
    myFilter.fBox.requestFocus();
    else
    meldung("No selection");
    public void sendOutbox(){
    fromOutbox = true;
    int i;
    Block1:
    for(i=0; i<mailIndexVector.size(); i++){
    MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
    if(index.folder.equals("Outbox")){
         Vector mailVector = myReader.read(index.mailId);
    Block2:
         for(int j=0; j<mailVector.size(); j++){
         String m = (String)mailVector.elementAt(j);
         if(m.indexOf("Subject:") != -1){
         for(int k=0; k<=j+1; k++){
         mailVector.removeElementAt(0);
         break Block2;
         Vector toVector = new Vector();
         int tEnd = 1;
         String line = "";
         String t = index.to;
         while (tEnd != -1){
         tEnd = t.indexOf(", ");
         if (tEnd == -1)
         line = t;
         else
         line = t.substring(0,tEnd);
         t = t.substring(tEnd + 1);
         toVector.addElement(line);
         File home = new File(".");
         String mailsVerzeichnis = "." + home.separator + "data";
         File datei = new File(mailsRemark, index.mailId);
         datei.delete();
         mySendman = new Sendman(mailVector, toVector, index.subject,
         ailsAnzeig               mySetup, this);
         mySendman.start();
         mailIndexVector.removeElement(index);
         break Block1;
    if(i == mailIndexVector.size())
    fromOutbox = false;
    treeNewSign();
    public void partion(String cmd){
    if(tree.getLastSelectedPathComponent() != null){
    DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
    Object nodeInfo = node.getUserObject();
    if(nodeInfo instanceof MailIndex){
         MailIndex index = (MailIndex)nodeInfo;
         index.folder = cmd.substring(13).toString();
         treeNewSign();
    else
    meldung("No mails to partion!");
    public void SetupOpen(){
    if (mySetup.savePassword == false)
    mySetup.pTf.setText("");
    mySetup.setVisible(true);
    mySetup.aTf.requestFocus();
    public void addressbookOpen(){
    myAddressBook.setVisible(true);
    myAdressBook.tree.requestFocus();
    public void creatorOpen(){
    myCreator.setVisible(true);
    myCreator.tfTo.requestFocus();
    public void actionPerformed(ActionEvent event){
    Object obj = event.getSource();
    if (obj instanceof JMenuItem){
    String cmd = event.getActionCommand();
    if (cmd.equals("New fetched")){
         mailsfetch();
    else if (cmd.equals("Written new mails")) {
         creatorOpen();
    else if (cmd.equals("Reply")) {
         reply();
    else if (cmd.equals("Forward")) {
         forward();
    else if (cmd.equals("Outbox")) {
         sendOutbox();
    else if (cmd.equals("Delete")) {
         delete();
    else if ((cmd.length() >13) &&
         (cmd.substring(0,13).equals("Sorting-"))){
         sorting(cmd);
    else if (cmd.equals("Using Addressbook")){
         addressbookOpen();
    else if (cmd.equals("Filter working")){
         filterOpen();
    else if (cmd.equals("New Order")){
         myFixTask.tf.setText("");
         myFixTask.setVisible(true);
         myFixTask.tf.requestFocus();
    else if (cmd.equals("delete")){
         delete();
    else if ((cmd.length() >7) &&
         (cmd.substring(0,7).equals("nobody"))){
         if(viewSource == false){
         viewSource = true;
         menuNewSign();
         if(tree.getLastSelectedPathComponent() != null){
         DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
         Object nodeInfo = node.getUserObject();
         if(nodeInfo instanceof MailIndex){
         MailIndex index = (MailIndex)nodeInfo;
         mailsRemark(index.mailId);
         else{
         viewSource = false;
         menuNeuZeichnen();
         if(tree.getLastSelectedPathComponent() != null){
         DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
         Object nodeInfo = node.getUserObject();
         if(nodeInfo instanceof MailIndex){
         MailIndex index = (MailIndex)nodeInfo;
         mailsRemark(index.mailId);
    else if (cmd.equals("Setup")){
         SetupOpen();
    else if (obj instanceof JButton){
    String cmd = event.getActionCommand();
    if (cmd.equals("aga")){
         mailsHolen();
    else if (cmd.equals("Creator Open")){
         creatorOpem();
    else if(cmd.equals("rep")){
         reply();
    else if(cmd.equals("fwd")){
         forward();
    else if(cmd.equals("Setup Open")){
    SetupOpen();
    else if(cmd.equals("adr")){
         addressbookOpen();
    else if(cmd.equals("delete")){
         delete();
    else if(cmd.equals("Information")){
         myInfo.setVisible(true);
         myInfo.b.requestFocus();
    private class myWindowListener extends WindowAdapter{
    public void windowClosing(WindowEvent event){
    end();
    private class myTreeSelectionListener implements TreeSelectionListener{
    public void valueChanged(TreeSelectionEvent e) {
    DefaultMutableTreeNode node =
         (DefaultMutableTreeNode)(e.getPath().getLastPathComponent());
    Object nodeInfo = node.getUserObject();
    if(nodeInfo instanceof MailIndex){
         MailIndex index = (MailIndex)nodeInfo;
         mailsAnzeigen(index.mailId);
         index.read = "Yes";

    Some suggestions:
    1. as the others stated- you should really post specific questions rather than 1 huge ugly class!
    2. use code tags
    3. get a decent IDE- it would take about 1 minute to then see where the error is-
    4. the rrors were just misspelled 'synchronized' and missing argument ','
    5. Try not to make such huge classes!!- Try to follow certain coding "patterns"- like MVC- and not stick everything in 1 class- separate the functionality- it makes coding much easier!
    here is fixed code (at least gets rid of those last errors):
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class MailClient extends JFrame implements ActionListener{
      private Sendman mySendman;
      private Letterman myLetterman;
      public Writer myWrite;
      public Reader myReader;
      public Composer myComposer;
      private Setup mySetup;
      public Addressbook myAdressbook;
      private FixTask myFixTask;
      private Filter myFilter;
      private Info myInfo;
      public Vector mailIndexVector = new Vector();
      public Vector filterIndexVector = new Vector();
      public Vector folderVector = new Vector();
      private JPanel tArea, trae, icon, tField;
      private JTextArea ta;
      private JScrollPane view, treeScroll;
      private JTree tree;
      public JTextField tf;
      private JSplitPane split;
      private Dimension Size;
      private MailClient myMailClient;
      private String mailBody, subject, from;
      public boolean fromOutbox = false;
      public boolean viewSource = false;
      public static void main (String[] args) {
        MailClient myMailClient = new MailClient();
      public MailClient() {
        super("Mail-Client");
        ImageIcon linux = new ImageIcon("linux.gif");
        this.setIconImage(linux.getImage());
        icon = new JPanel();
        icon.setLayout(new FlowLayout(FlowLayout.LEFT));
        ImageIcon neu = new ImageIcon("getmail.gif");
        JButton neueMails = new JButton(neu);
        newMails.setActionCommand("Getting new Mails");
        newMails.addActionListener(this);
        newMails.setBorderPainted(false);
        newMails.setToolTipText("Getting new Mails");
        ImageIcon cr = new ImageIcon("creator.gif");
        JButton creator = new JButton(cr);
        creator.setActionCommand("Creator open");
        creator.addActionListener(this);
        creator.setBorderPainted(false);
        creator.setToolTipText("Creator open");
        JButton rep = new JButton(new ImageIcon("reply.gif"));
        rep.setActionCommand("rep");
        rep.addActionListener(this);
        rep.setBorderPainted(false);
        rep.setToolTipText("Reply");
        JButton fwd = new JButton(new ImageIcon("fwd.gif"));
        fwd.setActionCommand("fwd");
        fwd.addActionListener(this);
        fwd.setBorderPainted(false);
        fwd.setToolTipText("Forward");
        JButton ein = new JButton(new ImageIcon("settings.gif"));
        ein.setActionCommand("settings open");
        ein.addActionListener(this);
        ein.setBorderPainted(false);
        ein.setToolTipText("Setting open");
        JButton adr = new JButton(new ImageIcon("adressbook.gif"));
        adr.setActionCommand("adr");
        adr.addActionListener(this);
        adr.setBorderPainted(false);
        adr.setToolTipText("Addressbook");
        JButton lo = new JButton(new ImageIcon("trash.gif"));
        lo.setActionCommand("trash");
        lo.addActionListener(this);
        lo.setBorderPainted(false);
        lo.setToolTipText("trash");
        JButton in = new JButton(new ImageIcon("info.gif"));
        in.setActionCommand("Information");
        in.addActionListener(this);
        in.setBorderPainted(false);
        in.setToolTipText("Information");
        icon.add(newMails);
        icon.add(creator);
        icon.add(rep);
        icon.add(fwd);
        icon.add(set);
        icon.add(adr);
        icon.add(lo);
        icon.add(in);
        Vector h1 = myLeser.lese("Summary.4on");
        for(int i=0; i<h1.size(); i+=7){
          String id = h1.elementAt(i).toString();
          String fo = h1.elementAt(i+1).toString();
          String su = h1.elementAt(i+2).toString();
          String fr = h1.elementAt(i+3).toString();
          String to = h1.elementAt(i+4).toString();
          String da = h1.elementAt(i+5).toString();
          String re = h1.elementAt(i+6).toString();
          MailIndex index = new MailIndex(id, fo, su, fr, to, da, re);
          mailIndexVector.addElement(index);
        Vector h2 = myReader.read("Filter.4on");
        for(int j=0; j<h2.size(); j+=3){
          String fo = h2.elementAt(j).toString();
          String from = h2.elementAt(j+1).toString();
          String te = h2.elementAt(j+2).toString();
          FilterIndex index = new FilterIndex(fo, from, te);
          filterIndexVector.addElement(index);
        folderVector = myReader.read("Folder.4on");
        DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
        top = new DefaultMutableTreeNode("mails");
        top.add(inbox = new DefaultMutableTreeNode("Inbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Inbox"))
            inbox.add(new DefaultMutableTreeNode(m));
        top.add(outbox = new DefaultMutableTreeNode("Outbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Outbox")){
            outbox.add(new DefaultMutableTreeNode(m));
        top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Sentbox"))
            sentbox.add(new DefaultMutableTreeNode(m));
        for(int j=0; j<folderVector.size(); j++){
          top.add(trash =
          new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
          for(int i=0; i<mailIndexVector.size(); i++){
            MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
            if (m.folder.equals(folderVector.elementAt(j).toString()))
              trash.add(new DefaultMutableTreeNode(m));
        tree = new JTree(top);
        tree.getSelectionModel().setSelectionMode
        (TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.addTreeSelectionListener(new myTreeSelectionListener());
        treeScroll = new JScrollPane(tree);
        treeScroll.setFont(new Font("Monospaced",Font.PLAIN,6));
        baum.add("Center", treeScroll);
        MainMenu menuBar = new MainMenu(this, this);
        setJMenuBar(menuBar);
        setVisible(true);
      public void mailsFetcher() {
        myLetterman = new Letterman(this, mySetup);
        myLetterman.start();
      public void treeNewSign(){
        trae.remove(treeScroll);
        DefaultMutableTreeNode top, inbox, outbox, sentbox, trash;
        top = new DefaultMutableTreeNode("mails");
        top.add(inbox = new DefaultMutableTreeNode("Inbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Inbox"))
            inbox.add(new DefaultMutableTreeNode(m));
        top.add(outbox = new DefaultMutableTreeNode("Outbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Outbox"))
            outbox.add(new DefaultMutableTreeNode(m));
        top.add(sentbox = new DefaultMutableTreeNode("Sentbox"));
        for(int i=0; i<mailIndexVector.size(); i++){
          MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
          if (m.folder.equals("Sentbox"))
            sentbox.add(new DefaultMutableTreeNode(m));
        for(int j=0; j<folderVector.size(); j++){
          top.add(trash =
          new DefaultMutableTreeNode(folderVector.elementAt(j).toString()));
          for(int i=0; i<mailIndexVector.size(); i++){
            MailIndex m = (MailIndex)mailIndexVector.elementAt(i);
            if (m.folder.equals(folderVector.elementAt(j).toString()))
              trash.add(new DefaultMutableTreeNode(m));
        tree = new JTree(top);
        tree.getSelectionModel().setSelectionMode
        (TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.addTreeSelectionListener(new myTreeSelectionListener());
        treeScroll = new JScrollPane(tree);
        trae.add("Center", treeScroll);
        trae.repaint();
        setVisible(true);
      public void menuNewSign(){
        setJMenuBar(new MainMenu(this, this));
        setVisible(true);
      public String fromFilter (String t){
        String myFrom = "";
        int start, end;
        int a = t.indexOf("From:");
        if (a != -1){
          start = a + 6;
          ende = t.indexOf("\n",start);
          myFrom = t.substring(start,end);
        return myFrom;
      public String toFilter (String t){
        String myTo = "";
        int start, e1, e2, end;
        int a = t.indexOf("To:");
        if (a != -1){
          start = a + 4;
          end = t.indexOf("\n",start);
          myTo = t.substring(start,end);
          e1 = end + 1;
          if(t.substring(e1,e1+1).equals(" ")){
            while(t.substring(e1,e1+1).equals(" ")){
              while(t.substring(e1,e1+1).equals(" "))
                e1++;
              e2 = t.indexOf("\n",e1);
              myTo += " " + t.substring(e1,e2);
              e1 = e2 + 1;
        return myTo;
      public String dateFilter (String t){
        String myDate = "";
        int start, end;
        int a = t.indexOf("Date:");
        if (a != -1){
          start = a + 6;
          end = t.indexOf("\n",start);
          myDate = t.substring(start,end);
        return myDate;
      public String subjectFilter (String t){
        String mySubject = "";
        int start, end;
        int a = t.indexOf("Subject:");
        if (a != -1){
          start = a + 9;
          end = t.indexOf("\n",start);
          mySubject = t.substring(start,end);
        return mySubject;
      public String mailFilter (String t){
        String myMail = "";
        int start = 0, end = t.length();
        start = t.indexOf("\n\n") + 2;
        if (start != 1){
          int a = t.indexOf("\n\n" ,start);
          if (a != -1){
            if (t.indexOf(".",a+2) == a+2)
              if (t.indexOf("\n",a+3) == a+3)
                start = a;
          myMail = t.substring(start,end);
        return myMail;
      public void mailsRemark(String file){
        String mail = "", t = "";
        Vector mailVector = myReader.read(file);
        for (int i=0; i<mailVector.size(); i++)
          t += (String)mailVector.elementAt(i) + "\n";
        from = fromFilter(t);
        subject = subjectFilter(t);
        mailBody = mailFilter(t);
        mail += "Subject: " + subject + "\n";
        mail += "Date: " + dateFilter(t) + "\n";
        mail += "From: " + from + "\n";
        mail += "To: " + toFilter(t) + "\n";
        mail += "\n" + mailBody;
        if(viewSource == true)
          ta.setText(t);
        else
          ta.setText(mail);
      public synchronized void mails(String t){
        Status myStatus = new Status(this,t);
        myStatus.start();
      public void delete(){
        if(tree.getLastSelectedPathComponent() != null){
          DefaultMutableTreeNode node =
              (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
          if(node.isLeaf()){
            Object nodeInfo = node.getUserObject();
            if(nodeInfo instanceof MailIndex){
              MailIndex index = (MailIndex)nodeInfo;
              mailIndexVector.removeElement(index);
              int count = 0;
              for(int j=0; j<mailIndexVector.size(); j++){
                MailIndex index1 = (MailIndex)mailIndexVector.elementAt(j);
                String id = index1.mailId;
                if(id.equals(index.mailId))
                  count++;
              if(count == 0){
                File home = new File(".");
                String mailsRemark = "." + home.separator + "data";
                File datei = new File(mailsRemark, index.mailId);
                datei.delete();
              treeNewSign();
              menuNewSign();
            else{
              String t = (String)nodeInfo;
              boolean toDelete = false;
              for (int i=0; i<folderVector.size(); i++){
                if(folderVector.elementAt(i).equals(t)){
                  folderVector.removeElement(t);
                  konnteLoeschen = true;
              if(toDelete == false){
                message("This folder can not be deleted!");
              treeNewSign();
          else
            message("Folder is not Empty! Please delete Your mails.");
        else
          message("No Mails where selected to be deleted!");
      public void forward(){
        if(from != null){
          creatorOeffnen();
          myCreator.tfSb.setText("Fwd to: " + subject);
          myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                               "\n\n>\n>\n\n");
      public void reply(){
        if(from != null){
          creatorOeffnen();
          myCreator.tfTo.setText(from);
          myCreator.tfSb.setText("Reply to: " + subject);
          myCreator.ta.setText("<" + from + ">" + " wrote:\n\n" + mailBody +
                               "\n\n>\n>\n\n");
      public void end(){
        String h = "";
        for (int i=0; i<mailIndexVector.size(); i++){
          MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
          h += index.mailId + "\n";
          h += index.folder + "\n";
          h += index.subject + "\n";
          h += index.from + "\n";
          h += index.to + "\n";
          h += index.date + "\n";
          h += index.read + "\n";
        myWriter.writer(h,"Summary.4on");
        String w = "";
        for (int l=0; l<filterIndexVector.size(); l++){
          FilterIndex index = (FilterIndex)filterIndexVector.elementAt(l);
          w += index.folder + "\n";
          w += index.from + "\n";
          w += index.text + "\n";
        myWriter.write(w,"Filter.4on");
        String k = "";
        for(int j=0; j<folderVector.size(); j++)
          k += folderVector.elementAt(j).toString() + "\n";
        myWriter.writer(k,"Folder.4on");
        String t = "";
        for (int l=0; l<myAddressBook.addressIndexVector.size(); l++){
          AddressIndex aindex =
                   (AddressIndex)myAdressBook.adressIndexVector.elementAt(l);
          t += aindex.alias + "\n";
          t += aindex.email + "\n";
        myWriter.write(t,"Address.4on");
        setVisible(false);
        dispose();
        System.exit(0);
      public void filterOpen(){
        boolean test = false;
        if(tree.getLastSelectedPathComponent() != null){
          DefaultMutableTreeNode node =
              (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
          Object nodeInfo = node.getUserObject();
          if(nodeInfo instanceof String){
            myFilter.folder = (String)nodeInfo;
            for(int i=0; i<filterIndexVector.size(); i++){
              FilterIndex h = (FilterIndex)filterIndexVector.elementAt(i);
              if(h.folder.equals(nodeInfo)){
                myFilter.index = h;
                test = true;
                if(h.from.equals("")){
                  myFilter.box1 = false;
                  myFilter.fTf.setText("");
                  myFilter.fBox.setSelected(false);
                  myFilter.fTf.setEditable(false);
                else{
                  myFilter.box1 = true;
                  myFilter.fTf.setText(h.from);
                  myFilter.fBox.setSelected(true);
                  myFilter.fTf.setEditable(true);
                if(h.text.equals("")){
                  myFilter.box2 = false;
                  myFilter.tTf.setText("");
                  myFilter.tBox.setSelected(false);
                  myFilter.tTf.setEditable(false);
                else{
                  myFilter.box2 = true;
                  myFilter.tTf.setText(h.text);
                  myFilter.tBox.setSelected(true);
                  myFilter.tTf.setEditable(true);
                break;
          myFilter.setVisible(true);
          myFilter.fBox.requestFocus();
        else
          meldung("No selection");
      public void sendOutbox(){
        fromOutbox = true;
        int i;
        Block1:
        for(i=0; i<mailIndexVector.size(); i++){
          MailIndex index = (MailIndex)mailIndexVector.elementAt(i);
          if(index.folder.equals("Outbox")){
            Vector mailVector = myReader.read(index.mailId);
            Block2:
            for(int j=0; j<mailVector.size(); j++){
              String m = (String)mailVector.elementAt(j);
              if(m.indexOf("Subject:") != -1){
                for(int k=0; k<=j+1; k++){
                  mailVector.removeElementAt(0);
                break Block2;
            Vector toVector = new Vector();
            int tEnd = 1;
            String line = "";
            String t = index.to;
            while (tEnd != -1){
              tEnd = t.indexOf(", ");
              if (tEnd == -1)
                line = t;
              else
                line = t.substring(0,tEnd);
              t = t.substring(tEnd + 1);
              toVector.addElement(line);
            File home = new File(".");
            String mailsVerzeichnis = "." + home.separator + "data";
            File datei = new File(mailsRemark, index.mailId);
            datei.delete();
            mySendman = new Sendman(mailVector, toVector, index.subject,ailsAnzeig, mySetup, this);
            mySendman.start();
            mailIndexVector.removeElement(index);
            break Block1;
        if(i == mailIndexVector.size())
          fromOutbox = false;
        treeNewSign();
      public void partion(String cmd){
        if(tree.getLastSelectedPathComponent() != null){
          DefaultMutableTreeNode node =
              (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
          Object nodeInfo = node.getUserObject();
          if(nodeInfo instanceof MailIndex){
            MailIndex index = (MailIndex)nodeInfo;
            index.folder = cmd.substring(13).toString();
            treeNewSign();
        else
          meldung("No mails to partion!");
      public void SetupOpen(){
        if (mySetup.savePassword == false)
          mySetup.pTf.setText("");
        mySetup.setVisible(true);
        mySetup.aTf.requestFocus();
      public void addressbookOpen(){
        myAddressBook.setVisible(true);
        myAdressBook.tree.requestFocus();
      public void creatorOpen(){
        myCreator.setVisible(true);
        myCreator.tfTo.requestFocus();
      public void actionPerformed(ActionEvent event){
        Object obj = event.getSource();
        if (obj instanceof JMenuItem){
          String cmd = event.getActionCommand();
          if (cmd.equals("New fetched")){
            mailsfetch();
          else if (cmd.equals("Written new mails")) {
            creatorOpen();
          else if (cmd.equals("Reply")) {
            reply();
          else if (cmd.equals("Forward")) {
            forward();
          else if (cmd.equals("Outbox")) {
            sendOutbox();
          else if (cmd.equals("Delete")) {
            delete();
          else if ((cmd.length() >13) &&
                   (cmd.substring(0,13).equals("Sorting-"))){
            sorting(cmd);
          else if (cmd.equals("Using Addressbook")){
            addressbookOpen();
          else if (cmd.equals("Filter working")){
            filterOpen();
          else if (cmd.equals("New Order")){
            myFixTask.tf.setText("");
            myFixTask.setVisible(true);
            myFixTask.tf.requestFocus();
          else if (cmd.equals("delete")){
            delete();
          else if ((cmd.length() >7) &&
                   (cmd.substring(0,7).equals("nobody"))){
            if(viewSource == false){
              viewSource = true;
              menuNewSign();
              if(tree.getLastSelectedPathComponent() != null){
                DefaultMutableTreeNode node =
                    (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
                Object nodeInfo = node.getUserObject();
                if(nodeInfo instanceof MailIndex){
                  MailIndex index = (MailIndex)nodeInfo;
                  mailsRemark(index.mailId);
            else{
              viewSource = false;
              menuNeuZeichnen();
              if(tree.getLastSelectedPathComponent() != null){
                DefaultMutableTreeNode node =
                    (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
                Object nodeInfo = node.getUserObject();
                if(nodeInfo instanceof MailIndex){
                  MailIndex index = (MailIndex)nodeInfo;
                  mailsRemark(index.mailId);
          else if (cmd.equals("Setup")){
            SetupOpen();
        else if (obj instanceof JButton){
          String cmd = event.getActionCommand();
          if (cmd.equals("aga")){
            mailsHolen();
          else if (cmd.equals("Creator Open")){
            creatorOpem();
          else if(cmd.equals("rep")){
            reply();
          else if(cmd.equals("fwd")){
            forward();
          else if(cmd.equals("Setup Open")){
            SetupOpen();
          else if(cmd.equals("adr")){
            addressbookOpen();
          else if(cmd.equals("delete")){
            delete();
          else if(cmd.equals("Information")){
            myInfo.setVisible(true);
            myInfo.b.requestFocus();
      private class myWindowListener extends WindowAdapter{
        public void windowClosing(WindowEvent event){
          end();
      private class myTreeSelectionListener implements TreeSelectionListener{
        public void valueChanged(TreeSelectionEvent e) {
          DefaultMutableTreeNode node =
              (DefaultMutableTreeNode)(e.getPath().getLastPathComponent());
          Object nodeInfo = node.getUserObject();
          if(nodeInfo instanceof MailIndex){
            MailIndex index = (MailIndex)nodeInfo;
            mailsAnzeigen(index.mailId);
            index.read = "Yes";
    }

  • Trouble compiling for printed documentation

    hello, i am having trouble compiling a new document layout i
    have created, i have followed peter grainges instructions on his
    website but it always fails to generate straight away. Im using
    Robohelp x5 with word 2000, does anyone have any ideas?
    thanks steve

    Steve
    Was RH installed on the PC you are using with you logon or
    that of the person whose job you have taken over? It sounds very
    much like the latter and this is exactly what I would expect to
    happen.
    Try creating a new project with just a couple of topics and
    printing from that. It will likely also fail. If it does that
    pretty much confirms my theory. Uninstall and reinstall RH with
    your logon and with admin rights attached and the problem will
    likely go away.

  • Trouble compiling a stored procedure

    Hello, I have trouble compiling a stored procedure. I include part of the code because I think the key problem is illustrated in these lines:
    date1 is declared as a DATE.
    index_value2 NUMBER;
    BEGIN
    date1 := (select sysdate from dual);
    index_value2 := (select index_value from tmsdat.a_index_values where price_date < (SELECT sysdate -180
       FROM dual) and price_date > (SELECT sysdate -210
       FROM dual));
    [\code]
    The problem seems to be that a more complex syntax is included in the allocation statement (:=), can that be the case? That is, no select etc??
    How is this solved?
    Any help much appreciated!
    best regards
    Harald                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Well, actually WhiteHat´s magic did the trick, but two errors:
    temp := (select (to_number(to_char(sysdate, 'DD'))-1)/(decode(to_char(sysdate,'MM'),'02',28,30)) as result
       from dual);
    [\code]
    this line generates problems but I think the approach is the same maybe, that is:
    select to_number(to_char(sysdate, 'DD'))-1)/(decode(to_char(sysdate,'MM'),'02',28,30)) into temp as result frmo dual
    Further, some error about encountering end of line?
    END CONVERT_MARKET_INDEX;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Trouble compiling servlet example

    Hi All, I am trying out an example for servlets and I ran into trouble compiling the the file called "FormProcessingServlet.java" in tutorial located here: http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/magercises/FormPostingAndProcessing/index.html
    The exact problem happens in this line:
    isStructure = context.getResourceAsStream(paramStructureFile[0]);
    The error says:
    FormProcessingServlet.java:127: cannot resolve symbol
    symbol : method getResourceAsStream (java.lang.String)
    location: interface javax.servlet.ServletContext
    isStructure = context.getResourceAsStream(paramStructureFile[0]);
    anyone else ran into this problem? How do I fix this? Thanks.

    "cannot resolve symbol" means that the JVM can't find a particular class.
    Adjust your systems classpath variable to include all the jar files that you use, I also add "." to include files in the current directory I'm working from.

Maybe you are looking for

  • Global reset of file / folder permissions on a USB Drive

    I just migrated to a new MB Pro. I now have an issue with file permissions on my USB drive that I use for Time Machine and some other external data. I understand (sort of) why the permissions are messed up, because you're forced to come up with a new

  • New calculation in pdf form

    I've got a little pdf-form where you can enter the unit price and the order size. The form will calculate the allround price (Text1+text2...), taxes and so on. First the unit price is multiplied by order size, these will be add and finally I calculat

  • Sent messages don't go anywhere in Mail

    I created an email address with my host and added my email to the iOS mail app using the host's IMAP server. However, under Accounts > Email, there is only one folder: Inbox. My host did not automatically configure the other folders for me (Trash, Se

  • Compressor 3.5 and HDV to MPEG2 stream?

    In the previous version of Compressor I wasn't able to get a decent MPEG2 for DVD from HDV. I found myself compressing the HDV to ProRes, then using the ProRes to make the MPEG2. It wasn't that good either. I'm wondering if Compressor 3.5 is getting

  • Converting an iphone 2g into an ipod touch

    I just bought a new 3Gs and they moved my sim card to this new iphone. How do I turn my old 2g into an ipod touch?