Howto - Using apache and mod_php4

This is a quick tutorial on how to use the apache web server with the php module.  I am by no means an expert, so if you have any questions/suggestion, please feel free.  That being said, let's get started:
1.  Install apache and php:
[root@limbo root]# pacman -Sy apache
[root@limbo root]# pacman -Sy php
2.  First, ensure that you have the apache web server running properly, and can serve up simple HTML documents:
[root@limbo phpbb]# /etc/rc.d/httpd start
[ Starting HTTP Daemon DONE ]
Now, point your browser to http://localhost/ and you should see a default Arch web server page.  If not, you must get this working before continuing.
3.  Now, if the apache web server is working, let's shut it down and work on adding PHP functionality:
[root@limbo root]# /etc/rc.d/httpd stop
[ Stopping HTTP Daemon DONE ]
4.  We must now make changes to the apache config file:
[root@limbo root]# nano /etc/httpd/conf/httpd.conf
5.  We must load the PHP module.  Find the LoadModule portion of httpd.conf and add:
LoadModule php4_module lib/apache/libphp4.so
and then find the AddModule section and add:
AddModule mod_php4.c
6.  To let apache know that files ending in .php are in fact PHP files, we add the following.  It doesn't matter where you put it, but you can search for AddType and pick a plac e you think fits.
# Added by root for mod_php
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
7.  And to ensure that .php files are looked at first by apache when looking at directory contents, find the section that looks like what you see below, but notice that I have added index.php for php index files:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>
8.  Now, change the root apache directory by finding the line containing DocumentRoot and change it to the following (we will create the directory shortly, and place an index.php in there also):
DocumentRoot "/home/httpd/html/phptest"
9.  For the final config step, we must tell the Arch init script to load the php module when it starts apache.  All we have to do is edit /etc/conf.d/httpd and add the APACHE_OPTS line:
HTTPD_USE_SSL="no"
APACHE_OPTS="-D PHP4"
10.  Now, create the directory /home/httpd/html/phptest
11.  Create a plain text file using your favorite text editor.  The file is  /home/httpd/html/phptest/index.php
The contents of this file should be the following:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<? phpinfo(); ?>
</body>
</html>
12.  Once running the apache web server, you will notice that Arch sets it up to run as user "nobody".  Therefore, we want "nobody" to own all the files that we are going to use:
[root@limbo root]# chown -R nobody.nobody /home/httpd/html/*
[root@limbo root]# chmod -R 744 /home/httpd/html/*
13.  Finally, start the apache web server again, and point your browser to your http://localhost/   You should now see alot of info, provided dynamically by the PHP module.
I hope this quick tutorial is useful.  It you see anything wrong with it, or have suggestions, please let me know and I will edit this post.

seba wrote:
hi, i cant start apache
[root@zlk daemons]# /etc/rc.d/httpd start
[ Starting HTTP Daemon                                                  FAILED ]
check you /var/log/httpd/error_log
:^)

Similar Messages

  • Enterprise portal access using reverse proxy using Apache and webdispatcher

    Hi Guys,
    As requirement, we need to give solution to customer about Reverse proxy scenario. I am new to this part.
    What we have think of to use Apache and Web dispatcher.
    I tried to search documents and found some sdn links also but still i am not comfortable to go about.
    Need suggestion and document if anyone has used so far.reverse proxy.
    As basis person, we need to do all ( Apache installation, Apache configuration, Web dispatcher installation and configuration, integration with EP.)
    It will helpful to me if i can get Apache installation, Apache configuration part and integration with EP, or web dispatcher, configuration etc.
    Thanks,
    Deepak

    We used Netscaler for Reverse Proxy implementation and can assure you that network team performed most of the set ups. This was on EP 7.01.
    From BASIS stand point it would be primarily Web Dispatcher Configuration.
    Also refer the links I specified in another thread. There are several scenarios discussed there -
    Re: Post values for userid and passowrd fields in logon page
    http://wiki.sdn.sap.com/wiki/display/BSP/Using+Proxies
    ~ Dhanz

  • Example of a successful reverse proxy to APEX using Apache and Oracle HTTP

    If this helps anyone, I was able to set up a reverse proxy to APEX with Apache running on the reverse proxy server and Oracle HTTP server and APEX 3.2 on the APEX hosting server. I want to post this due to there is no
    documentation on this that I can find. Oracle Metalink could not produce any "How To" document either.
    On the reverse proxy server in the httpd.conf file:
    ProxyRequests Off
    SetEnv force-proxy-request-1.0.1
    SetEnv proxy-nokeepalive 1
    ProxyPassReverse /pls/apex/ http://apex_server:8080/pls/apex/
    ProxyPass /pls/apex/ http://apex_server:8080/pls/apex/
    ProxyPassReverse /i/ http://apex_server:8080/i/
    ProxyPass /i/ http://apex_server:8080/i/
    AddType text/xml .xbl
    AddType text/x-component .htc
    OR
    ProxyRequests off
    RewriteEngine On
    RewriteRule ^/pls/apex/(.*)$ http://apex_server:8080/pls/apex/$1 [P,NE]
    ProxyRequests off
    ProxyPassReverse /i/ http://apex_server:8080/i/
    RewriteEngine On
    RewriteRule ^/i/(.*)$ http://apex_server:8080/i/$1 [P,NE]
    And in the Oracle HTTP server httpd.conf file of the APEX hosting server:
    NameVirtualHost 999.99.99.9:8080
    <VirtualHost 999.99.99.9:8080>
    ServerAdmin [email protected]
    DocumentRoot "/u01/app/ora11g/product/11.1.0/http_1/ohs/htdocs"
    ServerName reverse_proxy_server.com
    </VirtualHost>

    Here is what I saw :
    I have one Web Server 7.0 instance with the following obj.conf :
    <Object name="default">
    <If $uri =~ "/xyz">
    NameTrans fn="map" from="/" name="reverse-proxy-/xyz" to="/"
    </If>
    <ElseIf $uri =~ "/abc">
    NameTrans fn="map" from="/" name="reverse-proxy-/abc" to="/"
    </ElseIf>
    </Object>
    <Object ppath="*">
    Service fn="proxy-retrieve" method="*"
    </Object>
    <Object name="reverse-proxy-/abc">
    Route fn="set-origin-server" server="http://server1.sun.com:80"
    </Object>
    <Object name="reverse-proxy-/xyz">
    Route fn="set-origin-server" server="http://server2.sun.com:80"
    </Object> ...When I send a request to URI :
    /abc/test1.html : the request gets served from server1 from docs/abc/test1.html.
    /xyz/test2.html : the request gets served from server2 from docs/xyz/test2.html
    Where as when you change obj.conf to (note the change in "from" parameter in "map" SAF)
    <Object name="default">
    <If $uri =~ "/xyz">
    NameTrans fn="map" from="/xyz" name="reverse-proxy-/xyz" to="/"
    </If>
    <ElseIf $uri =~ "/abc">
    NameTrans fn="map" from="/abc" name="reverse-proxy-/abc" to="/"
    </ElseIf>
    </Object>
    <Object ppath="*">
    Service fn="proxy-retrieve" method="*"
    </Object>
    <Object name="reverse-proxy-/abc">
    Route fn="set-origin-server" server="http://server1:80"
    </Object>
    <Object name="reverse-proxy-/xyz">
    Route fn="set-origin-server" server="http://server2:80"
    </Object> ...In this case when I send a request to URI :
    /abc/test1.html : the request gets served from server1 from docs/test1.html.
    /xyz/test2.html : the request gets served from server2 from docs/test2.html.

  • Apache and weblogic server

    hi all.
    i am using oracle application server 10g R2 over windows server 2003 64bit
    but now i planned to go for apache and weblogic server for this i do not have idea that
    should i do? plz what softwares are required to use apache and weblogic server with current version
    10g R2.?

    The WebLogic Server (WLS) is a Java container similar to OC4J in Application Server 10g release 2. If you want to use WLS, you will have to upgrade your Application Server 10g installation to Fusion Middleware 11g. The upgrade path typically depends on the products which you are using in 10g, e.g. the upgrade path for SOA is different than the upgrade path for Forms/Reports or Oracle Portal. The [url http://docs.oracle.com/cd/E23943_01/upgrade.1111/e10125/before_you_begin.htm]Upgrade Planning Guide is a good start.
    Thanks,
    EJ

  • PDF PRINTING using Apache FOP and Oracle Containers for J2EE

    Hi,
    I am having major confusion about the pdf printing in Oracle XE and Apex 3.1.2.00.02
    It clearly states that this is an available option on the Oracle website.
    According to Apex there are two options for printing report regions.
    Standard - which is free
    Advanced - which uses BI and requires a licence
    Standard requires me to have Apache FOP (which is provided by Oracle in the Apex release) and Oracle Containers for J2EE (OC4J)
    Where my understanding of all this falls down is the part where I am downloading the Oracle Containers for J2EE and the license agreement states this cannot be used in a production system (only as a protptype). Can anyone clarify this? This is surely a required componenet and for the standard report printing which is supposed to be free.
    My problem is that I need to have a database system on a laptop that will go off site for a number of weeks. We need report printing options.
    Can anyone help with this. im desperate.
    Kind regards
    colin mclay

    no not yet with Application Server.
    I have tried to compare the settings to another installation with a separeted oc4j as described in the howto. But at the moment i found no mistakes.
    If i call the url adresse like:
    http://localhost:18101/fop/apex_fop.jsp
    i get:
    500 Internal Server Error
    Servlet error: java.lang.ClassNotFoundException: fop.apex__fop
    I installed it another time with these settings:
    Web Anwendung= .../fop.war (selected war file from apex install directory)
    Anwendungsname= fop
    URL zuordnen= /fop
    I would like to know if its possible to use the fop.war out of apex install directory with the Application server? In the standalone version (as described in howto) it works. But if you install it there you don't need to define an URL.
    Is the URL /fop correct or what do i have to insert there?

  • Using UltraSearch and Apache to implement Desktop Search on Linux/Windows

    Hi all:
    I made this howto for implementing Desktop Search on Linux/Windows using UltraSearch and Apache.
    Here the link:
    http://www1.exa.unicen.edu.ar/~mochoa/Miscellaneous/My_Desktop_Search-5.pdf
    Hope this hack, Marcelo.

    >
    I have used eclipse to create an executable jar. This is run on the console with commands like
    #java -jar myJarFile.jar
    Am using linux(OpenSUSE)
    How can I create an executable file in search a way that the use just clicks on the icon and the system launches?>There are at least two basic ways you can head.
    1) Add a manifest file to the Jar that specifies the main class. The end user can 'double click' it to launch the app.
    2) Deploy the Jar using webstart, which can install desktop and menu item shortcuts for a program (plus adding splash screens, automatic update..) while installing it.

  • PDF Creation and Saving in Database using Apache FOP

    Hi,
    I read lot of topics in this forum about using Apache FOP for creating PDF documents and I have configured the same and works fine.
    When user clicks a button, the PDF file is generated and it downloads the document. How can I make the PDF document save in the database.
    I would like to provide a interactive report with a link and they can download the document later.
    Thanks
    Karthik

    Hi, Karthik
    Think here how to save pdf in APEX 3.0 you can find more information about this
    Michael

  • Using Resin and Weblogic with Apache

    Hi,
    Does anybody know if i can use Weblogic to serve JSP and Resin to
    serve some servlets within Apache?
    Let me explain the case:
    We are testing to setup Weblogic with Apache as the webserver.
    Weblogic will be used to serve the JSP pages so i configured the
    httpd.conf as follows:
    <IfModule mod_weblogic.c>
    MatchExpression *.jsp
    WebLogicHost localhost
    WebLogicPort [port]
    </IfModule>
    This works fine and i can serve the jsp-pages without any problems.
    Since we work with thirdparty software we need to use Resin too. This
    is not much trouble to implement in Apache and i can make sure that
    some servlets are handled by caucho instead of Weblogic:
    <Location /servlet/Inventory>
    SetHandler caucho-request
    </Location>
    The above request works fine too!
    However i have to load the resin.conf file for full use of Resin in
    Apache. This setting however implicates that JSP pages aren't served
    by Weblogic anymore but are sent to Resin also. Even with the
    MatchExpression setting in httpd.conf, Apache still thinks JSP needs
    to be sent to Resin instead of Weblogic.
    Is there some way i can make sure that the JSP pages are served by
    Weblogic and not by Resin???
    Thanx in advance

    Hi all,
    Well, i figured it all out and if anyone would like to give it a try
    to, just do the following.
    The mod_caucho.so file was compiled with the option to handle .jsp
    files. I hashed out the following line in
    /src/c/plugin/common/config.c:
    cse_add_locatio ..... jsp etc.
    And then i configure the mod_caucho.so with:
    ./configure --with-apxs=/apps/apache/bin/apxs
    Now i have a perfect mod_caucho.so file which does not handle .jsp.
    All calls with .jsp are processed by weblogic, just as i wanted!
    Have fun with it (i shall :-)
    Remy
    [email protected] (Remy) wrote in message news:<[email protected]>...
    Hi,
    Does anybody know if i can use Weblogic to serve JSP and Resin to
    serve some servlets within Apache?
    Let me explain the case:
    We are testing to setup Weblogic with Apache as the webserver.
    Weblogic will be used to serve the JSP pages so i configured the
    httpd.conf as follows:
    <IfModule mod_weblogic.c>
    MatchExpression *.jsp
    WebLogicHost localhost
    WebLogicPort [port]
    </IfModule>
    This works fine and i can serve the jsp-pages without any problems.
    Since we work with thirdparty software we need to use Resin too. This
    is not much trouble to implement in Apache and i can make sure that
    some servlets are handled by caucho instead of Weblogic:
    <Location /servlet/Inventory>
    SetHandler caucho-request
    </Location>
    The above request works fine too!
    However i have to load the resin.conf file for full use of Resin in
    Apache. This setting however implicates that JSP pages aren't served
    by Weblogic anymore but are sent to Resin also. Even with the
    MatchExpression setting in httpd.conf, Apache still thinks JSP needs
    to be sent to Resin instead of Weblogic.
    Is there some way i can make sure that the JSP pages are served by
    Weblogic and not by Resin???
    Thanx in advance

  • I have downloaded MAMP for Mac and want to use it for working with Wordpress. I had mysql installed before this and would like to uninstall it and use MAMP. It was easy to turn off Apache and PHP but don't know how to uninstall mysql. Please help!!

    I have downloaded MAMP for Mac and want to use it for working with Wordpress. I'm on an Imac with Maverick OS 10.9. I had mysql installed before this and would like to uninstall it and use MAMP. It was easy to turn off Apache and PHP but don't know how to uninstall mysql. Please help!!

    It depends on how you installed it. You have to shutdown the MySQL service first. If you used the standard, but obsolete Startup Item, you can do that with the Startup Item. If you created a launchd script, you can do it with launchctl. Once MySQL is no longer running, you can delete the Startup Item or launchd script and the rest of MySQL.

  • HT4641 , I'm currently using apach, open office on my laptop, will I be able to import and edit these files using Pages??? Thanks in advance.

    , I'm currently using apach, open office on my laptop, will I be able to import and edit these files using Pages??? Thanks in advance.

    Yes, as long as you save them in .doc format.

  • Changes in httpd.conf and sap server 7.3 for using apache as proxy to irj

    We need to know the settings for using apache as a reverse proxy server in front of irj portal on SAP Netweaver 7.3. We have tried the following settings in httpd.conf but we cannot see the contents on irj portal in the html page on the browser while using apache as reverse proxy.
    ProxyPass /irj/ http://erpaix61.ca.com:50000/irj/
    ProxyPassReverse /irj/ http://erpaix61.ca.com:50000/irj/
    ProxyPass /testapp http://erpaix61.ca.com:50000/testapp
    ProxyPassReverse /testapp http://erpaix61.ca.com:50000/testapp
    RewriteRule ^/(sap\(.*) http://erpaix61.ca.com:50000/$1 [P,L]

    Hi Luis,
    I am facing the similar issue. I am not able to find the solution anywhere... Do let me know if u solved it
    I am trying to reverse proxy SAP 7.3 using Apache 2.0.6.4 as the webserver. It was working fine with SAP 7.01. But with 7.3, i am facing GUI problems, the URL says i have been logged in, but the GUI is not being displayed....
    "The requested URL /com.sap.portal.pagebuilder/html/EmptyDocument.html was not found on this server."
    ^^ is the error message that i am getting.
    Below is the reverse proxy lines that i have added in the httpd.conf file of apache. which worked fine for SAP 7.01
    ProxyRequests Off
    ProxyPass /irj http://<SAP 7.3 IP>:50000/irj/
    ProxyPassReverse /irj http://<SAP 7.3 IP>:50000/irj/
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass /webdynpro http://<SAP 7.3 IP>:50000/webdynpro
    ProxyPassReverse /webdynpro http://<SAP 7.3 IP>/webdynpro
    ProxyPreserveHost On
    Regards,
    Jatin Shetty

  • SSO with a website using Apache Httpclient form post

    Hi ,
    I am trying to obtain, SS0 with a website, that accepts the user information via post.
    I tried using app Integrator, but the website sends a cookie in first request, and redirects to another URL. App Integrator is only catching the first response.
    Thus i tried implementing this Form post using Apache HTTPClient class inside the Abstractportacomponent, as shown..
    The login is taking place. But, When i click on any link on the page, It is redirecting to the login page again, I am wondering where should i give the Cookie, so the portal request will include that cookie in its subsequent requests, so that i wont be prompted for login agian..
    thank you,
    chiranjeevi.
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
        {try
                      String url = "http://www.xxxxxxxxxxxxx.com/gold_online/validate.asp";
                      //Here, calling the timberline comes into place.
                       HttpClient client = new HttpClient();
                        PostMethod method = new PostMethod (url);
                        method.setFollowRedirects(false);
                        method.addParameter( "code","xxxxxxx");
                        method.addParameter( "upass", "xxxxxx" );
                                  int statusCode = client.executeMethod( method );
                        if( statusCode != -1 ) {
                             // The Status code for this first request is 302..which is a redirect with the redirect path
                             Header locationHeader = method.getResponseHeader("location");
                             Header cookie = method.getResponseHeader("set-cookie");
                             String redirectedURL = locationHeader.getValue();
                             String host = "http://www.xxxxxxxxxxxxxx.com/gold_online/";
                             redirectedURL = host+redirectedURL;
                             GetMethod method2 = new GetMethod (redirectedURL);
                             method2.setFollowRedirects(false);
                             method2.setRequestHeader("cookie",cookie.getValue());
                             method2.addRequestHeader("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, /");
                             int statuscode2 = client.executeMethod( method2);
                             String contents  = method2.getResponseBodyAsString();
                             // Converting the Relative URLs to Absolute URLs
                             contents = replace (contents,"src=\"","src=\""+host);
                             contents = replace(contents,"href=\"","href=\""+ host);
                             Cookie ck = new Cookie("cookie", cookie.getValue()) ;
                             //adding the cookie to the response...
                             response.addCookie(ck);
                             response.write(contents);
                          method.releaseConnection();

    Hi Manish,
    first, welcome on SDN! About your question:
    The URL iView in SP9++ has been reported quite instable from different sides (just do a look on "URL iView" within this forum). The alternative for the aim you have is to use the good "old" application integrator iView, which behaves very stable and will do what you want without hesitating...
    Also see URL iView and HTTP System - SSO to web app
    Hope it helps
    Detlev
    PS: Please consider to reward point for helpful answers on SDN. Thanks in advance!

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • SSL Connection Configuration between Apache and Weblogic 8,1

    I'm currently using Apache web server as a front end server for Weblogic server 8.1 and now i' facing some configuration problem to setting up the SSL connection between this 2 server. When i open my web application page, it shows
    Failure of Server Apache bridge
    No backend server available for connection: timed out after 10 seconds or idempotent set to OFF.
    and my proxy.log shows:
    Thu Nov 03 09:36:41 2011 <182413202842013> INFO: SSL is configured
    Thu Nov 03 09:36:41 2011 <182413202842013> INFO: SSL configured successfully
    Thu Nov 03 09:36:41 2011 <182413202842013> Using Uri /favicon.ico
    Thu Nov 03 09:36:41 2011 <182413202842013> After trimming path: '/favicon.ico'
    Thu Nov 03 09:36:41 2011 <182413202842013> The final request string is '/favicon.ico'
    Thu Nov 03 09:36:41 2011 <182413202842013> SEARCHING id=[ebwdsk298.ebworx.com:7002] from current ID=[ebwdsk298.ebworx.com:7002]
    Thu Nov 03 09:36:41 2011 <182413202842013> The two ids matched
    Thu Nov 03 09:36:41 2011 <182413202842013> @@@FOUND...id=[ebwdsk298.ebworx.com:7002], server_name=[10.122.50.218], server_port=[80]
    Thu Nov 03 09:36:41 2011 <182413202842013> attempt #0 out of a max of 5
    Thu Nov 03 09:36:41 2011 <182413202842013> general list: trying connect to '10.122.50.48'/7002/7002 at line 2696 for '/favicon.ico'
    Thu Nov 03 09:36:41 2011 <182413202842013> New SSL URL: match = 0 oid = 22
    Thu Nov 03 09:36:41 2011 <182413202842013> Connect returns -1, and error no set to 10035, msg 'Unknown error'
    Thu Nov 03 09:36:41 2011 <182413202842013> EINPROGRESS in connect() - selecting
    Thu Nov 03 09:36:41 2011 <182413202842013> Setting peerID for new SSL connection
    Thu Nov 03 09:36:41 2011 <182413202842013> 0a7a 3230 5a1b 0000 .z20Z...
    Thu Nov 03 09:36:41 2011 <182413202842013> Local Port of the socket is 2121
    Thu Nov 03 09:36:41 2011 <182413202842013> Remote Host 10.122.50.48 Remote Port 7002
    Thu Nov 03 09:36:41 2011 <182413202842013> general list: created a new connection to '10.122.50.48'/7002 for '/favicon.ico', Local port:2121
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Host]=[10.122.50.218]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Connection]=[keep-alive]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Accept]=[*/*]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[User-Agent]=[Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Accept-Encoding]=[gzip,deflate,sdch]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Accept-Language]=[en-US,en;q=0.8]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs from clnt:[Accept-Charset]=[ISO-8859-1,utf-8;q=0.7,*;q=0.3]
    Thu Nov 03 09:36:41 2011 <182413202842013> URL::sendHeaders(): meth='GET' file='/favicon.ico' protocol='HTTP/1.1'
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Host]=[10.122.50.218]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Accept]=[*/*]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[User-Agent]=[Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.163 Safari/535.1]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Accept-Encoding]=[gzip,deflate,sdch]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Accept-Language]=[en-US,en;q=0.8]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Accept-Charset]=[ISO-8859-1,utf-8;q=0.7,*;q=0.3]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Connection]=[Keep-Alive]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[WL-Proxy-SSL]=[false]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[WL-Proxy-Client-IP]=[10.122.50.48]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[Proxy-Client-IP]=[10.122.50.48]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[X-Forwarded-For]=[10.122.50.48]
    Thu Nov 03 09:36:41 2011 <182413202842013> Hdrs to WLS:[X-WebLogic-Force-JVMID]=[unset]
    Thu Nov 03 09:36:41 2011 <182413202841921> INFO: No session match found
    Thu Nov 03 09:36:41 2011 <182413202842013> INFO: No CA was trusted, validation failed
    Thu Nov 03 09:36:41 2011 <182413202841921> INFO: DeleteSessionCallback
    Thu Nov 03 09:36:41 2011 <182413202842013> ERROR: SSLWrite failed
    Thu Nov 03 09:36:41 2011 <182413202842013> SEND failed (ret=-1) at 789 of file ../nsapi/URL.cpp
    Thu Nov 03 09:36:41 2011 <182413202842013> *******Exception type [WRITE_ERROR_TO_SERVER] raised at line 790 of ../nsapi/URL.cpp
    Thu Nov 03 09:36:41 2011 <182413202842013> Marking 10.122.50.48:7002 as bad
    Thu Nov 03 09:36:41 2011 <182413202842013> got exception in sendRequest phase: WRITE_ERROR_TO_SERVER [os error=0,  line 790 of ../nsapi/URL.cpp]: at line 3078
    Thu Nov 03 09:36:41 2011 <182413202842013> INFO: Closing SSL context
    Thu Nov 03 09:36:41 2011 <182413202842013> INFO: Error after SSLClose, socket may already have been closed by peer
    Thu Nov 03 09:36:41 2011 <182413202842013> Failing over after WRITE_ERROR_TO_SERVER exception in sendRequest()
    Can anyone tell me what should i do in order to correct this error? Your help is kindly appreciate!!! Please~

    1) Is the managed server up?
    2) from apache server are you able to bind the managed server port?
    3) can you pls send the weblogic ssl configuration?

  • HOWTO: Use BC4J With or Without DB Triggers

    This HowTo describes how to use BC4J, database sequences and triggers
    and what are the ramifications.
    INTRODUCTION
    BC4J has the ability to work with database sequences in order to obtain a
    unique value when inserting records. BC4J also has the ability to
    work either with a 'before insert' trigger which automatically creates
    a new unique value for the primary key or without a trigger. When not using
    a database trigger, BC4J also has the ability to obtain the sequence value
    and set the primary key value.
    Before discussing the ramifications of using one approach or the other, let's
    show examples of how to use both approaches:
    BC4J & sequences WITH a database trigger
    and
    BC4J & sequences WITHOUT a database trigger
    HOWTO DEMONSTRATION STEPS
    To illustrate both scenarios a simple database setup script is provided which
    creates two tables:
    CUSTOMER_NT which DOES NOT have a before insert trigger and
    CUSTOMER_WT which DOES have a trigger.
    Database Install Script:
    <code>
    drop trigger customer_insert_trigger;
    drop table customer_wt;
    drop table customer_nt;
    drop sequence customer_wt_seq;
    drop sequence customer_nt_seq;
    create sequence customer_wt_seq start with 1;
    create sequence customer_nt_seq start with 101;
    create table customer_wt(
    id number,
    name varchar2(30),
    constraint
    customer_wt_pk
    primary key (id)
    create table customer_nt(
    id number,
    name varchar2(30),
    constraint
    customer_nt_pk
    primary key (id)
    prompt Inserting data...
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Mickey');
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Goofy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Daffy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Porky');
    commit
    prompt Creating trigger
    create trigger customer_insert_trigger
    before insert on customer_wt for each row
    begin
    select customer_wt_seq.nextval into :new.id from dual ;
    end;
    </code>
    The next step is to create the DEFAULT Entity Objects and View Objects using
    the Business Components Wizard.
    USING BC4J WITH A DATABASE TRIGGER
    Let's modify the entity object CustomerWt so it can use the database trigger.
    Edit the entity object CustomerWt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox. This allows you to insert without a value for the primary key
    - Check 'Refresh after Insert'. This obtains the value from the database generated by the trigger.
    - Check 'Updateable While New'. Id is only updateable when inserting.
    Click finish to complete the wizard. Save all and recompile the project.
    Now let's test our work.
    In the navigator right-click the application module and select 'Test..'. This will launch
    BC4J's built in tester. Connect to the application.
    In the tester double-click the CustomerWtView view object to run a test edit form.
    After the edit form renders, navigate through the existing records using the navigate
    buttons on the edit form. Now let's insert a record to execute the trigger.
    click on the '+' button to insert a record. Enter a value in the 'Name' field and commit the change.
    Observe that a new value has automatically been inserted into the Id field.
    That's it! You have successfully used BC4J and a database trigger.
    Now let's try it without a trigger..
    USING BC4J WITHOUT A DATABASE TRIGGER
    Now edit the entity object CustomerNT so it doesn't need a database trigger.
    Similar to before, edit the entity object CustomerNt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox.
    - Check 'Updateable While New'.
    An additional step is also required. The Create method will have to be modified to extract
    the value of the sequence.
    In the Edit EntityObject Wizard click the Java tab and select Create method and click Finish.
    The create method is generated in your Java fil e. In the Workspace view of the Navigator,
    expand the CustomerNt entity object in the navigator. Double-click
    CustomerNtImpl.java to open it in the Source Editor. In the Structure pane, double-click
    create(AttributeList). Modify the Create method so it looks like this:
    <code>
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl s = new SequenceImpl("customer_nt_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue())); }
    </code>
    Save and compile the project.
    Now test the ViewObject CustomerNtView using the tester as before.
    In the edit form of CustomerNTView click on the '+' to insert a record. Observe that
    just as before a new value has automatically been inserted in the ID field!
    TO USE A DB TRIGGER OR NOT TO USE A DB TRIGGER.
    Using a Database trigger sometimes preferable if you have non BC4J applications
    also sharing the database. In this case it is still safest to just let the database
    update it's own primary keys.
    If you don't have any other non-BC4J applications sharing the database, then not using
    a database trigger is perfectly acceptable and can have slightly better performance.
    The important thing to remember is that the option is yours to use either approach!
    null

    Thank you for the reply Jonathon. I am using a ViewObject which
    consist of several tables. I haven't tried the DB trigger
    approach but just using the BC4 approach in overriding the
    create method.
    Here is the parent class create as a part of the
    FasNameImpl.java file which does the job correctly.
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl l_seq = new SequenceImpl
    ("SEQ_CUSTOMER_ID",getDBTransaction());
    Integer l_next = (Integer)l_seq.getData();
    setCustomerId(new Number(l_next.intValue()));
    This is when I triedpassing the value to the child table. But I
    can't figure it out. I think the link is working fine if I had a
    ViewLink deployed but it doesn't look like it's doing the job
    for ViewObject.
    I am trying to call the childclass.method
    (FasCustomer.setCustomerId(l_next);
    But I am getting error.
    Thanks a lot for your suggestions,
    Kamran
    703 696 1121

Maybe you are looking for