Quantcast

phpmyadmin config and readme

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

phpmyadmin config and readme

Paul Irofti-4
Hi,

I think both the readme and the apache configuration need an update.
There are more things to enable before phpmyadmin can work and
restricting local access is done differently since apache 2.4. OK?

Paul


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/phpmyadmin/Makefile,v
retrieving revision 1.128
diff -u -p -u -p -r1.128 Makefile
--- Makefile 1 Feb 2017 08:52:36 -0000 1.128
+++ Makefile 20 Mar 2017 13:00:01 -0000
@@ -3,6 +3,7 @@
 COMMENT= tool to handle the administration of MySQL over the web
 
 V= 4.6.6
+REVISION= 0
 
 PKGNAME= phpMyAdmin-$V
 DISTNAME= phpMyAdmin-$V-all-languages
Index: files/phpMyAdmin-httpd.conf
===================================================================
RCS file: /cvs/ports/www/phpmyadmin/files/phpMyAdmin-httpd.conf,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 phpMyAdmin-httpd.conf
--- files/phpMyAdmin-httpd.conf 18 Jan 2013 15:17:43 -0000 1.2
+++ files/phpMyAdmin-httpd.conf 20 Mar 2017 13:00:01 -0000
@@ -29,7 +29,5 @@ Alias /phpMyAdmin ${INSTDIR}
  AllowOverride All
 
  # Default to only permitting access from localhost.
- Order deny,allow
- Deny from all
- Allow from 127.0.0.1
+ Require local
 </Directory>
Index: pkg/README
===================================================================
RCS file: /cvs/ports/www/phpmyadmin/pkg/README,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 README
--- pkg/README 1 Sep 2016 15:23:55 -0000 1.5
+++ pkg/README 20 Mar 2017 13:00:01 -0000
@@ -7,9 +7,11 @@ $OpenBSD: README,v 1.5 2016/09/01 15:23:
 phpMyAdmin has been installed into ${INSTDIR}.
 
 If using Apache, you can make this accessible to clients by enabling
-the configuration file:
+mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
+and the configuration file:
 
     # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
+    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
     # /etc/rc.d/apache2 restart
 
 By default, this sets an alias for /phpMyAdmin and restricts access

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Giovanni Bechis-4
On 03/20/17 14:03, Paul Irofti wrote:
> Hi,
>
> I think both the readme and the apache configuration need an update.
> There are more things to enable before phpmyadmin can work and
> restricting local access is done differently since apache 2.4. OK?
>
Sure, go for it.
I do not use Apache since $ages.
 Giovanni

> Paul
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/phpmyadmin/Makefile,v
> retrieving revision 1.128
> diff -u -p -u -p -r1.128 Makefile
> --- Makefile 1 Feb 2017 08:52:36 -0000 1.128
> +++ Makefile 20 Mar 2017 13:00:01 -0000
> @@ -3,6 +3,7 @@
>  COMMENT= tool to handle the administration of MySQL over the web
>  
>  V= 4.6.6
> +REVISION= 0
>  
>  PKGNAME= phpMyAdmin-$V
>  DISTNAME= phpMyAdmin-$V-all-languages
> Index: files/phpMyAdmin-httpd.conf
> ===================================================================
> RCS file: /cvs/ports/www/phpmyadmin/files/phpMyAdmin-httpd.conf,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 phpMyAdmin-httpd.conf
> --- files/phpMyAdmin-httpd.conf 18 Jan 2013 15:17:43 -0000 1.2
> +++ files/phpMyAdmin-httpd.conf 20 Mar 2017 13:00:01 -0000
> @@ -29,7 +29,5 @@ Alias /phpMyAdmin ${INSTDIR}
>   AllowOverride All
>  
>   # Default to only permitting access from localhost.
> - Order deny,allow
> - Deny from all
> - Allow from 127.0.0.1
> + Require local
>  </Directory>
> Index: pkg/README
> ===================================================================
> RCS file: /cvs/ports/www/phpmyadmin/pkg/README,v
> retrieving revision 1.5
> diff -u -p -u -p -r1.5 README
> --- pkg/README 1 Sep 2016 15:23:55 -0000 1.5
> +++ pkg/README 20 Mar 2017 13:00:01 -0000
> @@ -7,9 +7,11 @@ $OpenBSD: README,v 1.5 2016/09/01 15:23:
>  phpMyAdmin has been installed into ${INSTDIR}.
>  
>  If using Apache, you can make this accessible to clients by enabling
> -the configuration file:
> +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
> +and the configuration file:
>  
>      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
> +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
>      # /etc/rc.d/apache2 restart
>  
>  By default, this sets an alias for /phpMyAdmin and restricts access
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Paul Irofti-4
On Mon, Mar 20, 2017 at 02:57:21PM +0100, Giovanni Bechis wrote:
> On 03/20/17 14:03, Paul Irofti wrote:
> > Hi,
> >
> > I think both the readme and the apache configuration need an update.
> > There are more things to enable before phpmyadmin can work and
> > restricting local access is done differently since apache 2.4. OK?
> >
> Sure, go for it.
> I do not use Apache since $ages.

Are you using this with httpd? I tried for 10 minutes but then give up
as it was taking too much time for such a trivial task.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Giovanni Bechis-4
On 03/20/17 14:59, Paul Irofti wrote:

> On Mon, Mar 20, 2017 at 02:57:21PM +0100, Giovanni Bechis wrote:
>> On 03/20/17 14:03, Paul Irofti wrote:
>>> Hi,
>>>
>>> I think both the readme and the apache configuration need an update.
>>> There are more things to enable before phpmyadmin can work and
>>> restricting local access is done differently since apache 2.4. OK?
>>>
>> Sure, go for it.
>> I do not use Apache since $ages.
>
> Are you using this with httpd? I tried for 10 minutes but then give up
> as it was taking too much time for such a trivial task.
>
I am not using httpd(8) yet, I moved to nginx(8) and never come back (yet).
 Giovanni

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Paul Irofti-4
On Mon, Mar 20, 2017 at 03:00:29PM +0100, Giovanni Bechis wrote:

> On 03/20/17 14:59, Paul Irofti wrote:
> > On Mon, Mar 20, 2017 at 02:57:21PM +0100, Giovanni Bechis wrote:
> >> On 03/20/17 14:03, Paul Irofti wrote:
> >>> Hi,
> >>>
> >>> I think both the readme and the apache configuration need an update.
> >>> There are more things to enable before phpmyadmin can work and
> >>> restricting local access is done differently since apache 2.4. OK?
> >>>
> >> Sure, go for it.
> >> I do not use Apache since $ages.
> >
> > Are you using this with httpd? I tried for 10 minutes but then give up
> > as it was taking too much time for such a trivial task.
> >
> I am not using httpd(8) yet, I moved to nginx(8) and never come back (yet).

Why don't you add an example for nginx as well then? :)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Stuart Henderson
In reply to this post by Paul Irofti-4
On 2017/03/20 15:03, Paul Irofti wrote:
>  phpMyAdmin has been installed into ${INSTDIR}.
>  
>  If using Apache, you can make this accessible to clients by enabling
> -the configuration file:
> +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
> +and the configuration file:
>  
>      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
> +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/

Please symlink rather than cp, and use variables so this doesn't
get stale after a PHP update:

    # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Paul Irofti-4
On Tue, Mar 21, 2017 at 07:56:55AM +0000, Stuart Henderson wrote:

> On 2017/03/20 15:03, Paul Irofti wrote:
> >  phpMyAdmin has been installed into ${INSTDIR}.
> >  
> >  If using Apache, you can make this accessible to clients by enabling
> > -the configuration file:
> > +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
> > +and the configuration file:
> >  
> >      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
> > +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
>
> Please symlink rather than cp, and use variables so this doesn't
> get stale after a PHP update:
>
>     # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/

Good point on the variables!

I actually wanted to discus ln -s vs. cp. Isn't this a bad idea in
general? For the php bit I agree that it is useless to copy, but for the
phpmyadmin.conf I think it's actually required to cp instead of link: if
I customize the config I also modify the sample file which will get
overwritten by an update or pkg_add will scream about a bad checksum,
right?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Giovanni Bechis-4
On 03/21/17 12:02, Paul Irofti wrote:

> On Tue, Mar 21, 2017 at 07:56:55AM +0000, Stuart Henderson wrote:
>> On 2017/03/20 15:03, Paul Irofti wrote:
>>>  phpMyAdmin has been installed into ${INSTDIR}.
>>>  
>>>  If using Apache, you can make this accessible to clients by enabling
>>> -the configuration file:
>>> +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
>>> +and the configuration file:
>>>  
>>>      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
>>> +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
>>
>> Please symlink rather than cp, and use variables so this doesn't
>> get stale after a PHP update:
>>
>>     # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/
>
> Good point on the variables!
>
> I actually wanted to discus ln -s vs. cp. Isn't this a bad idea in
> general? For the php bit I agree that it is useless to copy, but for the
> phpmyadmin.conf I think it's actually required to cp instead of link: if
> I customize the config I also modify the sample file which will get
> overwritten by an update or pkg_add will scream about a bad checksum,
> right?
>
exactly, config.inc.php should not be a symlink.
 Giovanni

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Giovanni Bechis-7
On 03/21/17 12:11, Giovanni Bechis wrote:

> On 03/21/17 12:02, Paul Irofti wrote:
>> On Tue, Mar 21, 2017 at 07:56:55AM +0000, Stuart Henderson wrote:
>>> On 2017/03/20 15:03, Paul Irofti wrote:
>>>>  phpMyAdmin has been installed into ${INSTDIR}.
>>>>  
>>>>  If using Apache, you can make this accessible to clients by enabling
>>>> -the configuration file:
>>>> +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
>>>> +and the configuration file:
>>>>  
>>>>      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
>>>> +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
>>>
>>> Please symlink rather than cp, and use variables so this doesn't
>>> get stale after a PHP update:
>>>
>>>     # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/
>>
>> Good point on the variables!
>>
>> I actually wanted to discus ln -s vs. cp. Isn't this a bad idea in
>> general? For the php bit I agree that it is useless to copy, but for the
>> phpmyadmin.conf I think it's actually required to cp instead of link: if
>> I customize the config I also modify the sample file which will get
>> overwritten by an update or pkg_add will scream about a bad checksum,
>> right?
>>
> exactly, config.inc.php should not be a symlink.
>  Giovanni
>
s/config\.inc\.php/phpmyadmin\.conf/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Antoine Jacoutot-7
In reply to this post by Paul Irofti-4
On Tue, Mar 21, 2017 at 01:02:47PM +0200, Paul Irofti wrote:

> On Tue, Mar 21, 2017 at 07:56:55AM +0000, Stuart Henderson wrote:
> > On 2017/03/20 15:03, Paul Irofti wrote:
> > >  phpMyAdmin has been installed into ${INSTDIR}.
> > >  
> > >  If using Apache, you can make this accessible to clients by enabling
> > > -the configuration file:
> > > +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
> > > +and the configuration file:
> > >  
> > >      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
> > > +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
> >
> > Please symlink rather than cp, and use variables so this doesn't
> > get stale after a PHP update:
> >
> >     # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/
>
> Good point on the variables!
>
> I actually wanted to discus ln -s vs. cp. Isn't this a bad idea in
> general? For the php bit I agree that it is useless to copy, but for the
> phpmyadmin.conf I think it's actually required to cp instead of link: if
> I customize the config I also modify the sample file which will get
> overwritten by an update or pkg_add will scream about a bad checksum,
> right?

No, because phpmyadmin.conf is a @sample. It will only be overwritten if it was
not locally modified.

--
Antoine

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: phpmyadmin config and readme

Giovanni Bechis-7
In reply to this post by Stuart Henderson
On Tue, Mar 21, 2017 at 07:56:55AM +0000, Stuart Henderson wrote:

> On 2017/03/20 15:03, Paul Irofti wrote:
> >  phpMyAdmin has been installed into ${INSTDIR}.
> >  
> >  If using Apache, you can make this accessible to clients by enabling
> > -the configuration file:
> > +mod_rewrite in ${SYSCONFDIR}/apache2/httpd2.conf, the mysql php module,
> > +and the configuration file:
> >  
> >      # ln -s ../modules.sample/phpmyadmin.conf /var/www/conf/modules/
> > +    # cp /etc/php-5.6.sample/mysqli.ini /etc/php-5.6/
>
> Please symlink rather than cp, and use variables so this doesn't
> get stale after a PHP update:
>
>     # ln -s ../php-${MODPHP_VERSION}.sample/mysqli.ini ${SYSCONFDIR}/php-${MODPHP_VERSION}/
>
what about this one ?
I added an nginx example and renamed the httpd file to apache2, phpmyadmin-httpd will be the httpd(8) example.
  Cheers
   Giovanni

phpmyadmin-4.6.6p0.diff (9K) Download Attachment
signature.asc (817 bytes) Download Attachment
Loading...