0

Im having some issues and Im out of options on where to look.

I've installed a codeigniter site onto EC2 and sorted out all of the correct configurations so the site works fine.

There are some legacy pages which are in seperate codeingiter files in the same www directory in Apache. Each one has their own .htaccess file.

My enabled site config looks like this:

<VirtualHost xxx.xx.xx.xxx:80>
    ServerName mysite.com
    ServerAlias www.mysite.*
    #DocumentRoot /home/mysite
    DocumentRoot /home/mysite/sites/production
    ErrorLog /var/log/error_log_mysite
    CustomLog "/var/log/access_log_housebites.log combined

    Alias /blog /home/mysite_blog
    <Directory /home/mysite_blog>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

The blog .htaccess looks like this:

DirectoryIndex index.php
RewriteEngine on

RewriteBase /blog/

RewriteCond $1 !^(index\.php|gallery|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

The error in the log files states:

[Fri Nov 01 19:27:43.091985 2013] [:error] [pid 3953] [client 91.125.181.111:50889] PHP Fatal error:  Call-time pass-by-reference has been removed in /var/www/mysite_blog/wp-content/plugins/flickrpress/flickr.php on line 67

Im pretty sure this is an issue with PHP 5.5 being installed on the new server where 5.3 was installed on the old server.

Is there a way to overwrite PHP to simply use 5.3 on Ubuntu/Apache now?

RonnyKnoxville
  • 6,166
  • 10
  • 46
  • 75
  • [`flickrpress`](http://wordpress.org/plugins/flickrpress/) is out of date. Consider looking for a new plugin. – gen_Eric Nov 01 '13 at 20:24

1 Answers1

1

Well, one thing you can do is fix the flickr.php file or at the very least make sure you've upgraded to the latest version. From: PHP 5.4 Call-time pass-by-reference - Easy fix available?

// Wrong way!
myFunc(&$arg);               # Deprecated pass-by-reference argument
function myFunc($arg) { }

Use:

// Right way!
myFunc($var);                # pass-by-value argument
function myFunc(&$arg) { }
Community
  • 1
  • 1
Jon Lin
  • 142,182
  • 29
  • 220
  • 220
  • Unfortunately I cannot go through all of the legacy code to make these changes. It would take too long – RonnyKnoxville Nov 01 '13 at 20:03
  • @JackalopeZero Well, then just install php5.3 – Jon Lin Nov 01 '13 at 20:04
  • Im looking for a way to do it without taking the server down for too long. Any ideas? Im on 5.5 atm – RonnyKnoxville Nov 01 '13 at 20:08
  • @JackalopeZero [Try google](https://www.google.com/search?safe=off&site=&source=hp&q=ubuntu+downgrade+php+5.5+to+5.3&oq=ubuntu+downgrade+ph&gs_l=hp.1.6.0l7.759.4091.0.6049.19.13.0.6.6.0.354.1645.8j2j2j1.13.0....0...1c.1.30.hp..4.15.1061.dwSBQJOrNpc) or Ask Ubuntu – Jon Lin Nov 01 '13 at 20:13
  • I've been searching for over an hour already – RonnyKnoxville Nov 01 '13 at 20:15
  • You can normally fix these things quite well by switching on logging and then you take a look where the this happens most often repeatedly. Then you go in there and fix those lines. Normally after a day or two you've fixed everything. Those changes are most often not that harsh. Its similar with code giving notices and warnings. Typical maintenance work. If you don't want to maintain, don't upgrade PHP (and prepare it then to die). – hakre Nov 03 '13 at 12:14