• What on Earth have I done to my site?
    I am getting loads of errors instead of the actual content. The same thing is affecting all 3 of my WP sites: –
    http://www.furrie.net/
    http://blog.furrie.net/
    http://rtw.jasonluke.co.uk/
    (all hosted on my FreeBSD 4.8 box – venus.furrie.net)
    It MUST be something that I’ve done.
    All 3 sites have different MySQL DataBases & I can see that they appear to be fine (looking at phpMyAdmin – which would suggest that php is working too)…
    I think it would be prudent at this point, to mention that I’ve been upgrading some software “stuff” on the box, but am not sure exactly which package has rocked the boat…
    Would anybody please be kind enough to have a quick squint at the above sites & see if you can figure out what I’ve broken?
    This is some of the message I now get on screen, when going to the site: –
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /data/www/furrie.net/b2-include/b2template.functions.php on line 1536
    Warning: array_unique() [function.array-unique]: The argument should be an array in /data/www/furrie.net/b2-include/b2template.functions.php on line 1537
    Warning: Invalid argument supplied for foreach() in /data/www/furrie.net/b2-include/b2template.functions.php on line 1542

Viewing 11 replies - 1 through 11 (of 11 total)
  • unprocessed PHP code. scares the hell out of me. 🙁

    It is most likely a problem with your host, I would recommend contacting them.

    Thread Starter furrie

    (@furrie)

    Oh Dear. The host…
    That would be me then 🙁
    Erm, I wonder if perhaps there’s anyone who’s seen this before, that has also been silly like me, but fixed the mess?
    I tried searching the site, but it was fruitless.
    I live in hope…

    did you touch apache or php? that’d be where i’d start.

    Thread Starter furrie

    (@furrie)

    Well, as you can see, the answer would be “Yes”. I have changed stuff. I noticed that the blog was broken on the 2nd November.
    root@Venus:/usr/ports/distfiles# cat /var/log/www/httpd-error.log
    [Thu Oct 23 02:41:31 2003] [notice] Apache/1.3.28 (Unix) PHP/5.0.0a1-alexdupre configured — resuming normal operations
    [Mon Oct 27 20:38:04 2003] [notice] Apache/1.3.28 (Unix) PHP/5.0.0a1-alexdupre configured — resuming normal operations
    [Tue Oct 28 16:48:14 2003] [notice] Apache/1.3.28 (Unix) DAV/1.0.3 PHP/5.0.0a1-alexdupre configured — resuming normal operations
    [Sat Nov 1 16:55:25 2003] [notice] Apache/1.3.29 (Unix) DAV/1.0.3 PHP/5.0.0a3-alexdupre configured — resuming normal operations
    [Wed Nov 5 11:37:47 2003] [notice] Apache/1.3.29 (Unix) PHP/5.0.0a3-alexdupre configured — resuming normal operations
    [Thu Nov 6 02:45:05 2003] [notice] Apache/1.3.29 (Unix) DAV/1.0.3 PHP/5.0.0a3-alexdupre configured — resuming normal operations
    I don’t think WebDAV is responsible, because (as you can see in the httpd-error.log), I unconfigured it, tested the blog, then re-configured it. Apache1.3 had no problems on the upgrade & I see no change in the way it serves. The PHP/5.0.0a3-alexdupre package seemed to upgrade well, but on checking again… There is already another version available (possibly a bugfix?).
    Looking at the “other” problem I’ve had, I wonder if this is where my problem lies… I have been unable to successfully upgrade limbcrypt: –
    root@Venus:/usr/src# portupgrade -Rr libmcrypt
    —> Upgrading ‘libmcrypt-2.5.6_1’ to ‘libmcrypt-2.5.7_1’ (security/libmcrypt)
    —> Building ‘/usr/ports/security/libmcrypt’
    ===> Cleaning for libmcrypt-2.5.7_1
    ===> Extracting for limbcrypt-2.5.7_1
    >> Checksum mismatch for libmcrypt-2.5.7.tar.gz.
    ===> Refetch for 1 more times files: libmcrypt-2.5.7.tar.gz
    >> libmcrypt-2.5.7.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
    >> Attempting to fetch from http://us.dl.sourceforge.net/mcrypt/.
    fetch: http://us.dl.sourceforge.net/mcrypt/libmcrypt-2.5.7.tar.gz: Requested Range Not Satisfiable
    >> Couldn’t fetch it – please try to retrieve this
    >> port manually into /usr/ports/distfiles/ and try again.
    *** Error code 1
    Stop in /usr/ports/security/libmcrypt.
    *** Error code 1
    Stop in /usr/ports/security/libmcrypt.
    ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade71733.0 make
    ** Fix the problem and try again.
    —> Skipping ‘www/mod_php5’ (mod_php5-5.0.0.a3,1) because ‘security/libmcrypt’ (libmcrypt-2.5.6_1) failed
    ** The following packages were not installed or upgraded (*:skipped / !:failed)
    ! security/libmcrypt (libmcrypt-2.5.6_1) (checksum mismatch)
    * www/mod_php5 (mod_php5-5.0.0.a3,1)
    So, it looks as if there’s a patched version of mod_php5, that I am unable to install in the normal way, because there is a “checksum mismatch” bug in libmcrypt… This is apparently a known bug: –
    o [2003/10/16] ports/58131 ports-bugs Checksum error on libmcrypt port
    o = open
    A problem report has been submitted, no sanity checking performed.
    From here, I know not where to go 🙁
    THIS forum, is probably no longer the one to be asking the questions on now though…
    Pointers anyone?

    Thread Starter furrie

    (@furrie)

    OK then.
    I’ve managed to get over the checksum problem (simply by deleting the source file in /usr/ports/distfiles) & both libmcrypt & mod_php are succesfully upgraded.
    I still have a broken blog though, so it must be something in Apache or the newer version of php…

    You must have posted while I was typing my answer! 🙂 No biggie, I was going to say, just delete the original port and it will be forced to download and perform the cleaning again. It also had the wrong download site for SourceForge. You might want to fix that in the future. (http://www.onlamp.com/lpt/a/4111) It also looks like you are using an Alpha build of PHP (pre-alpha port actually) which in my opinion, is simply a very bad idea in a production server unless you are debugging/beta testing PHP itself. I would look into switching back to 4.3.4 port of PHP stable and your array problems should go away. I believe this bug is from the Zend Engine that PHP5 comes with and causes problems in certain apache installations. As of 8:30 this morning, there is no mention of this bug in the developer CVS. I hope I led you somewhat in the right direction.

    OK, all is not well at Chez furrie.
    I tared up my mysql folder & saved it elsewhere, so that I could start again & just untar it, but I’ve had some problems.
    I wonder if there’s a MySQL guru (compared to me, everyone should fall into this category!), that would be able to help me with advice on bringing my blog back online.
    I’ve started a fresh (enabling me to remove some of the junk I’d accumilated too).
    furrie@Venus:/data/www/furrie.net% uname -a
    FreeBSD venus.furrie.net 5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun 5 02:55:42 GMT 2003 root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386
    furrie@Venus:/data/www/furrie.net% pkg_info
    apache-1.3.27_4 The extremely popular Apache http server. Very fast, very
    mod_php4-4.3.1,1 PHP4 module for Apache
    mysql-client-3.23.56 Multithreaded SQL database (client)
    mysql-client-4.0.13 Multithreaded SQL database (client)
    mysql-server-4.0.13_1 Multithreaded SQL database (server)
    phpMyAdmin-2.3.2 A set of PHP-scripts to adminstrate MySQL over the web
    I have already done this once, but had so much fun the first time, I have started over 🙂 Basically, I untared the /var/db/mysql folder into my home directory & then moved each of the databases back to /var/db/mysql/{mydatabasefolder}
    This had SOME effect, but not greatly helpful. I firstly got permissions problems (thanks AndrewB for pointing that out), then I got errors about “incorrect data in /var/db/mysql/somedatabase/whatever.frm”. I was unable to find out exactly what I could do, to get the backed-up databases to appear valid & working.
    I know that my previous blog(s) are not extensive, but I would be most appreciative of some help with this. Also, I would be grateful if somebody would be able to advise me on a valid method of backing up my DataBase files, so that I WILL be able to re-instate them, should I ever need to.
    I live in hope… Chris P (furrie)

    Readin’ all that, I’m beyond a bit confused, but I do see a lot of MySQL things there. Could this be causing some of the confusion?
    Also, (for something I can understand), backing up your databases… why not do complete dumps of them? Even phpMyAdmin can dump them all into one file – I did this to back up some of my other stuff. 🙂

    Thread Starter furrie

    (@furrie)

    Yes, unfortunately, there is something wrong with the backups that I made, so that phpMyAdmin is no longer able to read the actual databases.or rather, MySQL doesn’t like them. Now I know about phpMyAdmin being able to perform dumps, I shall be doing that regularly. But my main problem remains…

    Thread Starter furrie

    (@furrie)

    Well, I have it sorted now. This is what I did: –
    I had previously tarred up my whole mysql folder, containing all my DBs.
    # tar cvf /data/backup/mysql.tar /var/db/mysql
    Having started with a fresh OS install & some known stable (not bleeding edge) programs: –
    FreeBSD 5.1-RELEASE
    apache-1.3.27_4
    mod_php4-4.3.1,1
    mysql-server-4.0.13_1
    mysql-client-4.0.13
    mysql-client-3.23.56 (last time I tried removing this package but it really upset things, so it’s staying)
    phpMyAdmin-2.3.2
    I untarred the mysql.tar file to a temp directory in my home directory on the new box. I then changed into that directory & tarred up each DB (which I’m told is just a directory with files in it), copied that file to /var/db/mysql/ & untarred them there. I changed their ownership to the same as that of the other working DBs.
    # chown -R mysql:mysql MyNewDBs
    Now that that was done & I could see no obvious “issues” with what I had, I was about to have a look at following your instructions…
    I could only find these files: –
    /usr/local/share/mysql/my-huge.cnf
    /usr/local/share/mysql/my-large.cnf
    /usr/local/share/mysql/my-medium.cnf
    /usr/local/share/mysql/my-small.cnf
    & there was no /etc/my.cnf
    I looked at the link you posted & ran: –
    # myisamchk /MyDBs/*
    which told me that all was fine… OK!
    I went to my websites & to my amazement, they were all working! Actually, there were some that weren’t, but that changed when I adjusted their php config files to the new mysql user details.
    I’m going to have a look at creating a /etc/my.cnf file (now I know that it exists – thanks).
    I am also going to have a gander at the .cgi script you posted a link to, tweak it for my system & maybe even use it! Just need to get my head round the code stuff. I’m no coder 🙂 I’m no webdesigner either! LOL
    I’ve got an entry in my crontab that does nightly backups of /var/db/mysql, but that will not be too great if it copies bad info over the top of good stuff, so I’ll have to get cracking on incremental backups.
    I’d like to thank you (& everyone else), for your help & support. I’ve tried to make this post as complete as possible, to make it helpful for future users.
    Kindest Regards,
    Chris Phillips
    (furrie)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘What on Earth have I done to my site?’ is closed to new replies.