Sunday, January 16, 2011

Why my php is not up to date

I use Yum on Fedora 11 to update my computer.

On my box, I have

[luc@zappa locale]$ php --version
PHP 5.2.9 (cli) (built: Apr 15 2009 09:30:33) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

But according to this page, my version is not supported.

I guess that I could un-install and re-install it with yum

yum remove php
yum install php

There is another way to ugrade my php ?

  • PHP 5.2.9 is the version of PHP that comes with Fedora 11. You can't yum install a newer version (at least not when using the default Fedora repositories). You could install from source but I wouldn't recommend doing that unless you know what you're doing. Is there something particular about it being unsupported that is a problem? Because, in theory, the Fedora maintainers are keeping 5.2.9 patched for, what, like another year.

    emgee : Also, technically speaking, Fedora 11 comes with PHP 5.2.9-2, so you can tell the maintainers have done at least something with it.
    From emgee
  • Any update system that uses anything other than source code is likely to be at least a little behind the latest version. It may therefore be that the version of PHP you have is the latest available from the Yum repositories you are using.

Service Unavailable - App Pool disabled error...anyone know why?

Hi guys

A small number of our sites intermediately experience an error that is a mystery to us.

Our set up is:

  • Windows Server 2003
  • IIS6
  • .NET 3.5
  • We have about 35 Websites running on IIS
  • Each site has it's own App Pool
  • Each App Pool has the identity: Network Service

The symptom is: The Application Pool for a site stops, and when you browse to the site, you only see:

SERVICE UNAVAILABLE

In the Event Logs, we have one Error, that looks like this:

Application pool 'AppPool1' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

And we have several Warnings leading up to the error, that look like this (note: the warnings look the same, except for the process id):

A process serving application pool 'AppPool1' suffered a fatal communication error with the World Wide Web Publishing Service. The process id was '292'. The data field contains the error number.

What's causing this? As I said, it doeasn't happen very often....the last time was about 6 months ago...and it usually happens with the same site/App pool.

Any ideas?

cheers!

  • The reason the app pool is being disable is because Rapid Fail protection is on, so after a number of App Pool faults it will stop the pool, rather than restarting it. Now you can disable Rapid Fail protection, but obviously that means your still getting the error, your just restarting the pool everytime, the best solution is to find out why its crashing in the first place.

    Unfortunately the error messages you get from IIS are not terribley useful, to get a better idea of what is causing the crash your going to need to run an IIS debug tool such as IISState to get more information about the error. It could be a problem with the particular code a site is running, or if its happening to multiple sites then maybe its something more general. Running these tools should give you a better fix on whats causing it.

    From Sam Cogan

Oracle 11g server rename issue

So we set up an Oracle server out of production (11g on Server 2008 x64) and our plan was to just rename the server's hostname to move it into production. Well, the database itself is functioning but every time we try to launch the management tool, it spawns up a bazillion and one processes (ever increasing) and at some point may end up causing the server to crash.

Is anyone familiar with Oracle issues pertaining to renaming of servers and the management tool failing?

  • Hi Tyler,

    My colleague is an Oracle OCM, i'm going to ask him and should have an update for you shortly.

    Best, Nick

  • Hi Tyler,

    From Shirish, comments below.

    "Hostname wont affect anything for database as long as its mapped correctly in /etc/hosts

    for tools (such as OEM or grid.. hostname is sometimes added in repository or the config files) ..unless you want to poke around for all those entries, best way will be to do a re-install (completely clean old install and then install again) of that tool . ( and usually its the fastest way too )"

    Please let us know if you need any specific instructions on how to do it.

    Nick O'Neil : You can re-install EM using OUI. Both EM and ORacle Software are installed in Separate Oracle Homes. When you launch OUI, you need to provide EM home (And not oracle home)
  • You can find the config files for the database specific DBCONSOLE in your ORACLE_HOME under a direcory named with the FQDN of the Host, an underscore, and the SID. eg

    myhost.mynetwork_mydatabase
    

    You could try stopping the dbconsole with

    set ORACLE_SID=mydatabase
    emctl stop dbconsole
    

    Then fiddling with the config files and dir names and then restarting the console.

    If that doesn't work then you can reinstall the dbconsole into a database with command line tools. I'd lookup the full set of help on EMCTL.

    Update: I had to recreate some DBCONSOLE repositories recently.

    The following steps worked well.

    Manual DBCONSOLE removal and recreation

    1. Remove the existing Windows Service
        Remove HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OracleDBConsole[SID]
    
    2. Remove the existing setup from the filesystem
        Delete %ORACLE_HOME%\DomainName_SID
        Delete %ORACLE_HOME%\oc4j\j2ee\OC4J_DBConsole_DomainName_SID
    
    3. Remove the SYSMAN schema from the database as SYS or SYSTEM
        drop user sysman cascade;
        drop role MGMT_USER;
        drop user MGMT_VIEW cascade;
        drop public synonym MGMT_TARGET_BLACKOUTS;
        drop public synonym SETEMVIEWUSERCONTEXT;
    
    4. Run the Database Configuration Assistant
        Select the database from the list
        Ensure that the DBCONSOLE option and the Enterprise Manager Repository options are ticked
    
    From Cephas
  • Yep - what cephas said. I was able to do this by renaming the .../product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_oldhostname_orcl to .../product/11.1.0/db1_oc4j/j2ee/OC4J_DBConsole_newhostname_orcl .

    after which i had it rebuild the em repository with: emca -config dbcontrol db -repos recreate

    From jskaggz

Wordpress theme not displaying properly, problem with .htaccess?

Hello, I hope this is the right forum for my question. I installed WordPress on the free host x10hosting, and everything seems to work fine except when I try to install a custom theme. The theme is not displaying properly at all, and I assume the css is not being rendered by the web server, I tried adding an .htaccess file as advice from a google search, and messed around with that but it doesn't seem to be doing anything, I'm not even sure if it could make a difference. Does anyone know why the theme (css web server rendering) would not be displaying properly?

Thanks.

  • O my, it seems I forgot to change the file permissions of the theme's directory. Got it!

    warren : sometimes it's those basic things that bite us in the rump :)

apache authentication using forms

Hi,

I am having issues trying to get users to authenticate against apache using mod____auth____ldap. What I would like is for users to authenticate using a form rather than the default dialog box that apache normally displays.

The server 'hosts' a number of applications. If a user tries to access these application without being authenticated against apache, I would like the server to redirect to the login page.

The login page currently sits on the DocumentRoot of the server and each application in it's own directory being referenced by an alias as the login application uses mod_rewrite for the urls. e.g.

Alias /someapp "/opt/applications/someapp/"

<Directory "/opt/applications/someapp">

AuthName "Login"
AuthBasicProvider ldap
AuthType Basic
AuthLDAPUrl ldap://ldapserver:389/dc=somedomain,dc=com?cn
AuthLDAPBindDN cn=Manager,dc=somedomain,dc=com
AuthLDAPBindPassword somepassword
AuthzLDAPAuthoritative off
require valid-user


</Directory>

The login app is using basic authentication against the server so as I understand it this should then enable users who are authorised to access other applications that are restircted using mod____auth____ldap??

Currently DocumentRoot doesn't have any auth_ldap restrictions on it at the moment.

How do I go about forcing a login page to authenticate against apache, so that users can then access the other application?

thanks...

  • Apache would not be able to display a login page by default. When you do a basic authentication, what it does is send a 401 status code back to the browser which pops up the username/password dialogue. Any sort of login page has to have the authentication processing done on the application side.

    As an alternative, you may want to look at a authentication federation system such as shibboleth or simplesamlphp. Setting it up can be a pain but once you do, it will do exactly what you want.

    It will:

    1. Allow you to protect any sites in Apache by specifying shibboleth as the authentication mechanism. It loads a mod_shib apache mod to handle the front-end filtering.
    2. It will present the user with a customisable login page
    3. You can configure the back-end to authenticate against LDAP.

    Hope this helps.

    Grant Collins : awesome... I will have a look and let you know how I find it. Thanks
    From sybreon

xampp apache on windows 7 returns http header only

i am having issues with xampp running on windows 7 RC32

i type in a localhost and get a header back only, no page content somedays it works fine, other days i can't get it to work after multiple attempts, reboot or otherwise

the request doesn't even get put into the acccess log which seems unusual

here is the log file at startup incase that helps

any ideas ??

[Wed Sep 09 12:27:08 2009] [notice] Digest: generating secret for digest authentication ...
[Wed Sep 09 12:27:08 2009] [notice] Digest: done
[Wed Sep 09 12:27:09 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 configured -- resuming normal operations
[Wed Sep 09 12:27:09 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Sep 09 12:27:09 2009] [notice] Parent: Created child process 2500
[Wed Sep 09 12:27:10 2009] [notice] Digest: generating secret for digest authentication ...
[Wed Sep 09 12:27:10 2009] [notice] Digest: done
[Wed Sep 09 12:27:11 2009] [notice] Child 2500: Child process is running
[Wed Sep 09 12:27:11 2009] [notice] Child 2500: Acquired the start mutex.
[Wed Sep 09 12:27:11 2009] [notice] Child 2500: Starting 250 worker threads.
[Wed Sep 09 12:27:11 2009] [notice] Child 2500: Starting thread to listen on port 443.
[Wed Sep 09 12:27:11 2009] [notice] Child 2500: Starting thread to listen on port 80.
[Wed Sep 09 12:27:15 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Sep 09 12:27:15 2009] [notice] Digest: generating secret for digest authentication ...
[Wed Sep 09 12:27:15 2009] [notice] Digest: done
[Wed Sep 09 12:27:16 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.9 configured -- resuming normal operations
[Wed Sep 09 12:27:16 2009] [notice] Server built: Dec 10 2008 00:10:06
[Wed Sep 09 12:27:16 2009] [notice] Parent: Created child process 3252
[Wed Sep 09 12:27:17 2009] [notice] Digest: generating secret for digest authentication ...
[Wed Sep 09 12:27:17 2009] [notice] Digest: done
[Wed Sep 09 12:27:18 2009] [notice] Child 3252: Child process is running
[Wed Sep 09 12:27:18 2009] [notice] Child 3252: Acquired the start mutex.
[Wed Sep 09 12:27:18 2009] [notice] Child 3252: Starting 250 worker threads.
[Wed Sep 09 12:27:18 2009] [notice] Child 3252: Starting thread to listen on port 443.
[Wed Sep 09 12:27:18 2009] [notice] Child 3252: Starting thread to listen on port 80.
  • Hello! It's easy to solve.

    Go to your XAMPP/apache/conf/httpd.conf en edit it with an text editor.

    Then you have to search for the word: ServerName localhost:80 With the newest xampp it is about line 181

    Then edit this string into: Servername 127.0.0.1:80

    That's all.

    Mathieu Netherlands

automatically backing up data onto another pc

Hi there

I have a machine running ubuntu server that I have set up to Wake on LAN

I also have a few pc running Windows XP.

What I want is to set it up so that every day or every time I log in or out, for an XP machine to back up the data onto the server.

I can manually wake the server by sending the magic packet and I can then run the backup tool included in XP to backup the data.

I have tried running it as a scheduled task but i cant get the wol packet to send this way.

Anyone got any ideas or an alternative way of waking the server and backing up the data?

Cheers

Update: cheers guys all good stuff, I'll have a proper look through tomorrow. I was using a GUI tool to send the WOL packet so that might have been why it was so hard.

Would you say SyncToy or rsync is better for doing the backup portion? Cheers

  • Try Windows SyncToy for backup. Can you give more details of your wake-up tool? There should be a way to set it up as a scheduled task...

    From
  • You could load an rsync server on WIndows and run a rsync job from the server to sync the data on a regular schedule - even when no one logs in.

    There is an open source windows build of rsync server called DeltaCopy.

    \\Greg

    From uSlackr
  • Create a batch file to run the WOL command, sleep for whatever amount of time you need for the target machine to be ready and then run the backup. Run that batch file via the task scheduler.

  • I would use a command line tool for sending the WOL packet. A GUI tool is hard to automate (or schedule). Scheduling a command line tool is straightforward.

    Google: command line wake-on-lan

    From Kalmi