Mediawiki and generateSitemap.php

Is this something that we need to run to make a wiki google searchable? I tried running it and I got a message:

Sorry! This version of MediaWiki requires PHP 5; you are running 4.4.7.

If you are sure you already have PHP 5 installed, it may be installed
in a different path from PHP 4. Check with your system administrator.

Is there a way around this or a Mediawiki extension that somebody would recommend?

Unless you are running some other program(s) on your domain that cannot run under PHP5, the easiest way to deal with this is just to set your domain up to use PHP5. :wink:

Just goto Control Panel -> Domains -> Manage domains and click the “Edit” link under the "Web Hosting "column of the row for your domain. Select the radio button for PHP5, and submit the form. All done! :wink:


My site is PHP 5.
From Special:Version

  • MediaWiki: 1.11.0
  • PHP: 5.2.3 (cgi-fcgi)
  • MySQL: 5.0.24a-standard-log

Ah! I see the problem now. I just assumed you were running over a browser, but I see now that you are needing to run the generateSitemap.php file from the command line.

It’s like the error message said, on DreamHost, PHP5 is “installed
in a different path from PHP 4”.

Try the following command line:

/dh/cgi-system/php5.cgi generateSitemap.php

…and you should be good to go.

php generateSitemap.php will run the DreamHost installed mod_php version of PHP4.4.7; you have to specify a full path to the appropriate pgp.cgi to run either the cgi version of PHP4 or PHP5 from the command line (your Domain setup in the Control Panel handles it for your browser based calls). :wink:


Ok. I cd’d to my directory and put in “/dh/cgi-system/php5.cgi generateSitemap.php.”

I got the following reply:
Status: 404
X-Powered-By: PHP/5.2.3
Content-type: text/html

No input file specified.
Is there something else I need to do?

I don’t think so … double check the filename, spelling, etc. ? It looks like php.cgi couldn’t find your file.

I don’t have that file to test particularly, but I tested just now using phpinfo.php on one of my domains:

cd /home/mysername/mydomain.tld

/dh/cgi-system/php5.cgi phpinfo.php

worked fine.


Got it… I realized what was going on, it needed the full path to generateSitemap.php.
I ended up doing this
"/dh/cgi-system/php5.cgi /home/user/" [/color](all one line)

It worked. Thanks.

Yep! That ought to do it too. I’m really glad you got it working. :slight_smile: