Opened 14 years ago

Closed 14 years ago

#25714 closed defect (invalid)

no change after php downgrade from 5.3 to 5.2.13 on Snow Leopard using macport

Reported by: dforrest@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: jyrkiwahlstedt
Port: php5 php52

Description (last modified by mf2k (Frank Schima))

Hello,

I needed to downgrade php from 5.3 to 5.2.13 on Snow Leopard and did the following after installing macports:

  1. sudo port uninstall php5 (seemed to run quickly with no error)
  2. port install php52 +mysql5 +apache2(ran successfuly)
  3. port variants php52 (ran and produced the following:

php52 has the variants:

   apache: Add Apache 1 web server module
     * conflicts with apache2 no_web
[+]apache2: Add Apache 2.2 web server module
     * conflicts with apache no_web
   dbase: Add dBase file format support
   debug: Enable debug support (useful to analyze a PHP-related core dump)
   fastcgi: Add FastCGI web server binary
     * conflicts with no_web
   gmp: Add GNU MP multiprocessing functions
   imap: Add IMAP protocol support
   ipc: Add semaphore, shared memory and IPC functions
   macports_snmp: Add SNMP support using MacPorts SNMP
     * conflicts with snmp
   mssql: Add MS-SQL server support
   mysql4: Add MySQL 4 support
     * conflicts with mysql5
   mysql5: Add MySQL 5 support
     * conflicts with mysql4
   no_web: Don't include any web server support
     * conflicts with apache apache2 fastcgi
   oracle: Add Oracle oci8 database functions with the Oracle Instant Client
   pcntl: Add process control functions
   pear: Add PEAR
   postgresql82: Add PostgreSQL 8.2 support
     * conflicts with postgresql83 postgresql84
   postgresql83: Add PostgreSQL 8.3 support
     * conflicts with postgresql82 postgresql84
   postgresql84: Add PostgreSQL 8.4 support
     * conflicts with postgresql82 postgresql83
   pspell: Add pspell spell-checking functions
   readline: Add GNU readline functions
   snmp: Add SNMP support using Apple SNMP
     * conflicts with macports_snmp
   sockets: Add socket communication functions
   sqlite: Add SQLite support
   suhosin: Add Suhosin patch
   t1lib: Add PostScript Type 1 font support with t1lib
   tidy: Add Tidy support
   universal: Build for multiple architectures

At the end of the day, the machine is still running php 5.3. Is there a step I missed?

Thank you in advance

Change History (6)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Cc: jwa@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Port: php5 php52 added
Priority: HighNormal
Summary: no change after php deprecation from 5.3 to 5.2.13 on Snow Leopard using macportno change after php downgrade from 5.3 to 5.2.13 on Snow Leopard using macport
Type: submissiondefect

In the future, please review WikiFormatting and Cc the port maintainers.

This is not appropriate for Trac, but I'm assigning it to the php port maintainers and they can decide.

comment:2 in reply to:  description Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to dforrest@…:

At the end of the day, the machine is still running php 5.3.

How did you determine that this is the case?

Does port installed php52 show that php52 is installed and active?

What does /opt/local/bin/php -v say? On my system, when php52 is installed, it says

PHP 5.2.13 (cli) (built: Jul 17 2010 14:32:26) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

If we are talking about using php52 in a web server (e.g. within apache2), have you restarted that web server?

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

David sent the following reply by email:


Ryan, Thanks for your response, I think we're close to finding the solution, here's what's up...

  1. I have a test.php file that contains the phpinfo command and when it runs it says that the php version is 5.3.1.
  2. When I run the two commands you specified, I get the results you expected:
    dfmacbookpro:~ dforrest$ port installed php52
    The following ports are currently installed:
      php52 @5.2.13_2+apache2+mysql5 (active)
    dfmacbookpro:~ dforrest$ /opt/local/bin/php -v
    PHP 5.2.13 (cli) (built: Jul 17 2010 00:59:37) 
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    
  3. I have restarted apache numerous times and have rebooted the machine too and still get the same results using phpinfo command, version=5.3.1.
  4. httpd.conf for apache has "LoadModule php5_module libexec/apache2/libphp5.so"
  5. Should #4 point to somewhere else? It's obvious according to #2 that 5.2.13 is installed, but, apache seems to still be using 5.3.1. Any ideas how to correct this?

Thank you very much,
David

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

David, remember to enter your replies into the ticket on the web site; replies sent by email do not become part of the ticket comments.

I suspect you are using Apple's Apache and not MacPorts' Apache. Turn off Apple's Apache (System Preferences > Sharing > Web Sharing) and turn on MacPorts' Apache (set up /opt/local/apache2/conf/httpd.conf as desired, then type "sudo port load apache2"). Don't use Apple's Apache if you want to use Apache modules supplied by MacPorts.

comment:5 in reply to:  4 Changed 14 years ago by dforrest@…

Replying to ryandesign@…:

David, remember to enter your replies into the ticket on the web site; replies sent by email do not become part of the ticket comments.

I suspect you are using Apple's Apache and not MacPorts' Apache. Turn off Apple's Apache (System Preferences > Sharing > Web Sharing) and turn on MacPorts' Apache (set up /opt/local/apache2/conf/httpd.conf as desired, then type "sudo port load apache2"). Don't use Apple's Apache if you want to use Apache modules supplied by MacPorts.

Ryan, Thank you SOOOOOOooooooo much for your help. Using the apache2 from macports did the trick along with a little httpd.conf tweaking. Is there a command I can run that will ensure that on reboot the machine will launch the macports apache instead of the apple one? Thanks again, David

comment:6 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

You have already run the command: "sudo port load apache2" launches MacPorts apache2 immediately and schedules it to launch at every subsequent system startup. To stop MacPorts apache2 immediately and prevent it from launching on startup in the future, run "sudo port unload apache2". MacPorts just installs normal Apple launchd plists, so you can also use "sudo launchctl" directly if you prefer, or a 3rd-party launchd plist manager. (Lingon used to be nice for this, but has been discontinued and I don't know if it works with current versions of Mac OS X anymore.)

Note: See TracTickets for help on using tickets.