Recent Topics

1 Jan 16, 2011 00:57    

My b2evolution Version: 4.0.3

The upgrade itself went fine. While posts were available on the main blog page, clicking any link to a post directly resulted in a PHP_SELF error. At a loss as to what to do, I contacted a friend who is fluent in PHP (because I am not) and he made a workaround to to it, but wasn't sure it was the best way to handle it and suggested I post here just to be sure. I'll include the info he sent back to me after making the fix.

I was able to make a fix, but I am not convinced it is the right way
to fix the problem.

PHP_SELF was equal to: /2011/01/09/what-is-java (this was just a particular post I'd given him to use as an example.)
when it should be equal to: /b2blog/blog1.php/2011/01/09/what-is-java

So I pulled the $pagenow out of SCRIPT_NAME, which is: /b2blog/blog1.php

The fix is in inc/_init_hit.inc.php:

Ln 223-230:
if( ! preg_match( '#/([A-Za-z0-9_\-.]+\.php[0-9]?)#',
$_SERVER['PHP_SELF'], $matches ))
{
$matches[1] = $_SERVER['SCRIPT_NAME'];
if (false == true)
{
debug_die('Can\'t identify current .php script name in PHP_SELF.');
}
}

I've read that PHP_SELF can be modified when using mod_rewrite, so
that is still my best-guess as to what the problem is. I however
suspect that the issue may be as simple as a misconfigured 'base
website URL' in the admin panel. Without digging in pretty deep, I
can't really be sure. I think you should post on the support forums,
since everything you're doing, I think, is supported, so perhaps this
is simply a bug.

You mentioned that you used the old config file--perhaps it actually
has changed and there is a value that is left unconfigured now? (I used my old _basic_config.php file just like I have for previous upgrades.)

Anyway, I've clicked around - everything seems to be in working order
(individual posts, category pages, main page).

I'm not sure if there is still something I should do to ensure that future intermediate and full upgrades go smoothly. Any advice welcome - and keep in mind I really don't know a whole log about all this. So you will have to really dummy it down for me. I'm fine with the back office stuff but if I need to edit any php files I'll need really easy instructions please. I have 3 separate blogs and a linkblog in my files.

Thanks,
Doris[b][/b]

2 Jan 16, 2011 03:31

This seems to be working for me anyway. Thanks for sharing ;)

3 Jan 28, 2011 23:17

I have a similar issue.

When I create a new blog, I'm getting:


Additional information about this error:
Can't identify current .php script name in PHP_SELF.

Existing blogs are working fine.

If I remove the test in _init_hit.inc.php, then I have issues to render the headers:


Warning: Cannot modify header information - headers already sent by (output started at /homez.152/s.../inc/_init_hit.inc.php:112) in /homez.152/spaggiars/www/inc/_core/_template.funcs.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at /homez.152/s.../inc/_init_hit.inc.php:112) in /homez.152/spaggiars/www/inc/_core/_template.funcs.php on line 243

Warning: Cannot modify header information - headers already sent by (output started at /homez.152/s.../inc/_init_hit.inc.php:112) in /homez.152/spaggiars/www/inc/_core/_template.funcs.php on line 244

Warning: Cannot modify header information - headers already sent by (output started at /homez.152/s.../inc/_init_hit.inc.php:112) in /homez.152/spaggiars/www/inc/_core/_template.funcs.php on line 245

Warning: Cannot modify header information - headers already sent by (output started at /homez.152/s.../inc/_init_hit.inc.php:112) in /homez.152/s.../inc/_core/_template.funcs.php on line 246

Any clue how I can fix that?

Here are the details regarding the host:


b2evolution version 4.0.3 released on 24/12/10 
Version MySQL 5.0.90-log 
PHP version 4.4.9 

Server is hosted by OVH so I can't modify PHP of MySQL version.

Thanks,

JM

4 Jan 29, 2011 00:23

Somebody really needs to make a decision on whether b2evo 4.x.x requires PHP5 or not. And then make that decision prominent (BIG and BOLD). Plenty of people with PHP4.x seem to be having issues (that are fixed by upgrading to PHP5), yet the the "Setup Instructions" link on the 4.0.3 download page takes you to a document that that claims PHP 4.3 or greater and MySQL 4.1 or greater are the minimum requirements for b2evo. 8|

So, how about an official line drawn in the sand? Or maybe update the Setup Instructions -- if you're going to point people to it? It might head off a lot of potential heartache and trouble.

Sorry jmspaggi, my recommendation would be upgrading PHP and MySQL. If you can't do that with your type of hosting... then you probably ought to stick with b2evo 3.3.3 or earlier.

5 Jan 29, 2011 01:52

I have no ways to update from php4 to php5 on OVH. It's a shared hosting. So I have what's there and that's all. :(

Is there any tutorial somewhere to downgrade from 4.0 to 3.3?

JM

6 Jan 29, 2011 02:21

Finally, I was able to activate PHP5 on my hosting by updating the .htaccess.

Here is what I have:


PHP version 5.2.17 

But I still have the same issue when trying to access the new blog.


Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /homez.152/s..../inc/_core/_misc.funcs.php on line 1922
An unexpected error has occurred!

If this error persists, please report it to the administrator.

Go back to home page
Additional information about this error:
Can't identify current .php script name in PHP_SELF.
Backtrace:

   1. debug_die( "Can't identify current .php script name in PHP_SELF.", "/cnc/" )
      File: /homez.152/s..../inc/_init_hit.inc.php on line 110
   2. require( "/homez.152/s..../inc/_init_hit.inc.php" )
      File: /homez.152/s..../inc/_main.inc.php on line 93
   3. require_once( "/homez.152/spaggiars/www/inc/_main.inc.php" )
      File: /homez.152/s..../index.php on line 27

Ignored last: 1

7 Jan 29, 2011 17:31

Now I tried to remove the blog I just created to create it back, and still have the issue.

Other blogs already created in v3.3 are still working fine.

Any idea how I can solve that?

JM

8 Jan 29, 2011 23:48

So.

I worked on that a bit again, and now I have:


PHP version 5.3.5 

And it's working.

Which mean b2evolution 4.0 is working only with php version 5.3 or more.

Special. Users might be informed when they do an upgrade that they might face big issues after it if php version is to low...

JM

9 Jan 30, 2011 00:34

For the record, I upgraded my b2evo version without upgrading my php version, and it worked fine on the main domain, but not so good on the subdomain. I had my host upgrade me to PHP5, which caused the entire site to start giving me 500 internal server errors or the missing skin error (even though the skin was clearly installed and had been switched to an upgraded one that came with 4.0.3) Turns out, version 4.0.3 is putting too much of a load on the CPU my site is hosted on, and I can't find a way around it.


Form is loading...