Gallery version (not just "2"): gallery2-2.1.2
PHP version (e.g. 4.3.11): php4-4.4.4
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33): apache-2.2.3
Database (e.g. MySql 4.0.11): mysql-server-4.0.27
Activated toolkits (e.g. NetPbm, GD): gd-2.0.33_4,1 netpbm-10.26.30
Operating system (e.g. Linux): FreeBSD 4.11-RELEASE-p3
Browser (e.g. Firefox 1.0): FF 1.5.0.7
I am attempting to fix a friend's installation of gallery2. When I goto the URL http://hostname/gallery/upgrade/index.php the file is wanted to be downloaded instead of being run as a php file.
what do I need to fix here?
Cheers,
noah
Posts: 32509
that's usually a symptom of a php error.
check out the apache error logs.
Posts: 94
thanks for your response.
it is a virtual host and nothing is appearing in the relevant virtual host error logs. what else can I check?
Posts: 94
just a follow up when I go to the http://domain.com/gallery page. I see the following in the access_log for the particular domain.
----- snip ------
66.IP - - [27/Sep/2006:08:46:15 -0700] "GET /gallery HTTP/1.1" 301 369 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"
66.IP - - [27/Sep/2006:08:46:15 -0700] "GET /gallery/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"
66.IP - - [27/Sep/2006:08:46:15 -0700] "GET /gallery/main.php HTTP/1.1" 302 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"
---- snip ---
nothing appears in the error log
and I arrive at the URL in my browser navigator bar:
http://www.domain.com/gallery/install/
Posts: 32509
the above log shows nothing for the /gallery/upgrade/index.php
Posts: 94
yeah that is peculiar. so what does that mean? there is nothing in the relevant error log. what else could show me whats going on?
cheers,
Noah
Posts: 32509
please post a phpinfo link.
and ensure that php's memory limit is really large (e.g. 64M) and error_reporting is set to E_ALL.
Posts: 94
the phpinfo.php page wants to be downloaded and is not executable from the browser.
but looking through the /usr/local/etc/php.ini I find the following from grep:
memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)
error_reporting = E_ALL
what else could I check?
Cheers,
Noah
Posts: 32509
are you sure php works on that box?
please post a link to the phpinfo file.
Posts: 94
Hi valiant,
php is working fine. gallery is working fine under other virtual hosts.
http://www.vaporvent.com/gallery/setup/phpinfo.php
cheers,
Noah
Posts: 32509
not on this one...
a phpinfo script like <?php phpinfo(); ?> is pretty much the simplest php script.
or <?php print "hello"; ?>
check with your webhost about this issue.
Posts: 94
I am the admin of the box. I will try the php script.
cheers,
Noah
Posts: 94
check the php info page out now.
http://www.vaporvent.com/gallery/phpinfo.php
but still the install/index.php wants to be downloaded.
Posts: 32509
set
display_errors to On
display_startup_errors On
and notice that error_log is set to log to the syslog at the moment!
then restart apache and check again.
Posts: 94
okay done
Posts: 32509
please ensure that php logs to your apache error log or specify a log file and then check if really no errors are logged.
Posts: 94
how can I insure my php logs to my apache error log? or how do I specify a log file?
looks like they are cufrrently ending up in /var/log/messages
Cheers,
Noah
Posts: 32509
error_log in php.ini
well, as long as you know where it's logged, that's fine. is there no php error logged in /var/log/messages ?
Posts: 94
no php errors
but apache is leaving a signal 11
there is no core file in /tmp from apache.
so I dont know what is going on .
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_name in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_module_name in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_save_path in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_id in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_regenerate_id in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_decode in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_register in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_unregister in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_is_registered in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_encode in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_start in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_destroy in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_unset in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_set_save_handler in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_cache_limiter in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_cache_expire in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_set_cookie_params in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_get_cookie_params in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_write_close in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: Function registration failed - duplicate name - session_commit in Unknown on line 0
Sep 28 10:53:36 httpd: PHP Warning: session: Unable to register functions, unable to load in Unknown on line 0
Sep 28 10:53:55 /kernel: pid 73876 (httpd), uid 80: exited on signal 11
Sep 28 10:53:55 /kernel: pid 73868 (httpd), uid 80: exited on signal 11
Sep 28 10:57:25 /kernel: pid 73866 (httpd), uid 80: exited on signal 11
Sep 28 10:57:25 /kernel: pid 73994 (httpd), uid 80: exited on signal 11
Sep 28 10:57:46 /kernel: pid 73996 (httpd), uid 80: exited on signal 11
Posts: 32509
what about using the last stable release of apache instead of the current stable / new release?
maybe use another php version...
Posts: 94
any clues what the last stable release of apache is/was?
cehers,
Noah
Posts: 94
I upgraded to php5-5.1.6
and see the following errors:
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/fileinfo.so' - Cannot open "/usr/local/lib/php/20050922/fileinfo.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/pcre.so' - Cannot open "/usr/local/lib/php/20050922/pcre.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/session.so' - Cannot open "/usr/local/lib/php/20050922/session.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/mysql.so' - Cannot open "/usr/local/lib/php/20050922/mysql.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/session.so' - Cannot open "/usr/local/lib/php/20050922/session.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/ftp.so' - Cannot open "/usr/local/lib/php/20050922/ftp.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/ctype.so' - Cannot open "/usr/local/lib/php/20050922/ctype.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/ldap.so' - Cannot open "/usr/local/lib/php/20050922/ldap.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/mbstring.so' - Cannot open "/usr/local/lib/php/20050922/mbstring.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/iconv.so' - Cannot open "/usr/local/lib/php/20050922/iconv.so" in Unknown on line 0
Sep 28 11:17:33 typhoon httpd: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20050922/gettext.so' - Cannot open "/usr/local/lib/php/20050922/gettext.so" in Unknown on line 0
Posts: 94
now when I try to go to the main page of a working gallery. I see the folllowing:
Sep 28 11:18:21 httpd: PHP Fatal error: Call to undefined function preg_match() in /a/www/data/www.domain.com/gallery/index.php on line 38
Posts: 32509
i no longer can access your phpinfo.
@preg_match:
g2 requires PHP compiled with PCRE regular expressions.
Posts: 94
now I am trying to upgrade gallery to gallery2 I am getting hte following error
Fatal error: Call to undefined function session_name() in /a/www/data/www.enabled.com/gallery/upgrade/index.php on line 74
I am runnning a portupgrade -Rr php5-5.1.6
to make sure that all dependencies are upgraded as lwel
Posts: 94
how do I ensure PHP is compiled with PCRE regular expression.
Posts: 94
here are the PHP options I chose.
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for php5 5.1.6 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [X] CLI Build CLI version x x
x x [X] CGI Build CGI version x x
x x [X] APACHE Build Apache module x x
x x [X] DEBUG Enable debug x x
x x [ ] SUHOSIN Enable Suhosin protection system x x
x x [ ] MULTIBYTE Enable zend multibyte support x x
x x [X] IPV6 Enable ipv6 support x x
x x [X] REDIRECT Enable force-cgi-redirect support (CGI only) x x
x x [ ] DISCARD Enable discard-path support (CGI only) x x
x x [X] FASTCGI Enable fastcgi support (CGI only) x x
x x [X] PATHINFO Enable path-info-check support (CGI only) x x
x x x x
x x x x
x x x x
x x x x
tqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
Posts: 94
the phpinfo URL is working again
http://www.vaporvent.com/gallery/phpinfo.php
Posts: 32509
you need php with pcre, the session extension, ...
Posts: 94
okay I figured out how to do that. Iam going ot add those extentions to php5
Posts: 94
okay gallery is still complaining and not seeing that php5-session is installed.
Fatal error: Call to undefined function session_name() in /a/www/data/www.domain.com/gallery/upgrade/index.php on line 74
pkg_info
# pkg_info | grep php
php5-5.1.6 PHP Scripting Language (Apache Module and CLI)
php5-ctype-5.1.6 The ctype shared extension for php
php5-dom-5.1.6 The dom shared extension for php
php5-extensions-1.0 A "meta-port" to install PHP extensions
php5-gettext-5.1.6 The gettext shared extension for php
php5-iconv-5.1.6 The iconv shared extension for php
php5-mysql-5.1.6 The mysql shared extension for php
php5-pcre-5.1.6 The pcre shared extension for php
php5-posix-5.1.6 The posix shared extension for php
php5-session-5.1.6 The session shared extension for php
php5-simplexml-5.1.6 The simplexml shared extension for php
php5-sqlite-5.1.6 The sqlite shared extension for php
php5-tokenizer-5.1.6 The tokenizer shared extension for php
php5-xml-5.1.6 The xml shared extension for php
php5-xmlreader-5.1.6 The xmlreader shared extension for php
php5-xmlwriter-5.1.6 The xmlwriter shared extension for php
php5-zlib-5.1.6 The zlib shared extension for php
Posts: 32509
edit php.ini
these are shared extensions (.so files), you need to enable them in php.ini and then you need to restart php.
Posts: 94
okay this is working now - thank you