Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Upgraded to PHP 5.2.14 - Some languages are broken

  1. #1
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default Upgraded to PHP 5.2.14 - Some languages are broken

    I've recently had my server upgraded to PHP 5.2.14. Currently, memcached is still down, so some functionality isn't working in my other add-ons, but it looks like vBET is.

    However, only a few languages are currently working!

    Danish works: PentaxForums.com - Pentax Photography Forum
    Polish doesn't: http://www.pentaxforums.com/forums/pl/

    This notice is shown on all forum pages:
    Notice: Use of undefined constant DIR - assumed 'DIR' in ************************************************************************************************************************../forums/includes/vbenterprisetranslator_functions_vbseo.php on line 18

    If I change this code in the vbet functions_vbseo file:
    if (!defined(DIR)) {
    define('DIR', (($getcwd = getcwd()) ? $getcwd : '.'));
    }
    to just
    define('DIR', (($getcwd = getcwd()) ? $getcwd : '.'));

    the warning disappears, but my problem isn't fixed. Any idea why this would be? FYI, there are no notices or errors currently being shown on the vBET pages.

    I copied and am still using my old php.ini file, so the same settings are being used as before.

    Thanks for your help!

    Adam
    Last edited by moman; 17-08-10 at 22:41.

  2. #2
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Update- the languages that I thought worked only appear to be working on the homepage! Try to open a thread when logged in as a member (username testuser, password test); it'll show a blank white page.

    Pentax DSLR Diskussion - PentaxForums.com

  3. #3
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Could the problem be with curl or iconv? They are on in PHP, but might not be working properly as a result of the upgrade. Is there any way to check this?
    Last edited by moman; 17-08-10 at 20:11.

  4. #4
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    I have some further insight on the issue-

    Only pages that can be fully fetched from cache are being shown. I tried disabling the cache for Danish, and then no pages were showing up.

  5. #5
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    One more observation:

    This code from my homepage previously successfully included a file (which still works if you open the url direcly), while after the upgrade it did nothing:

    PHP Code:
    <?php include('http://www.pentaxforums.com/content/homepage/rss/rss2html.php?XMLFILE=http://www.pentaxforums.com/forums/external.php?forumids=24,37'); ?>
    I had to add allow_url_include = On to php.ini, and then it worked. Perhaps some other required parameter for vbet is missing from the configuration file?
    Last edited by moman; 17-08-10 at 22:37.

  6. #6
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    And a final update before I go to bed for the night:

    I switched a setting in Plesk so that PHP is now run as a cgi application. This made the translations work again; however, when I switch back to running it as an apache module, evertything breaks again, and translated pages give 500 errors. Any ideas?

  7. #7
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    As you wrote: now translation is working again? vBET is working?
    Did you turn on your CURL?
    500 error - this is an error between apache and server - may be a wrong apache and server configuration? can you paste here your .htaccess?

  8. #8
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    It's working, but only when PHP runs as a CGI script, and not as an apache module.

    Here is my .htaccess:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /

    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|et|tl|fi|fr|gl|de|en|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/ [L,QSA]

    ************---

    Even when I ran php as an apache module, individual translations were working- so if I made a post using langtitle tags, it would get translated. However, untranslated pages, i.e. mysite/pl/thread.html, that couldn't be found in the cache simply generate blank white pages.

    It would be nice if we could track down the cause of this, as I have a feeling that something more serious is causing this to begin with.

  9. #9
    vBulletin Enterprise Translator (vBET) Staff
    Join Date
    May 2010
    Posts
    1,000

    Default

    This is your all .htaccess rules? or only part of this file? do you use vBSEO?

    I was on your site as testuser, post a test message, translate to polish, japan etc. and this is working.

    As I wrote in previous post - this is issue between php and apache. This issue is caused by wrong server configuration. You can write to your host provider and ask about good configuration. He must to check it.

  10. #10
    Senior Member
    Join Date
    Nov 2009
    Posts
    168

    Default

    Yup, that's it for the .htaccess inside the forums.

    I've contacted my host and they insist that the server is properly configured, but I've also read that CentOS only natively supports PHP 5.1.6. I guess I'm hosed untill I hire a server management company and migrate to a new OS.

    Thanks for your help.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •