php-general Digest 2 Jun 2013 13:12:02 -0000 Issue 8256

Topics (messages 321310 through 321328):

Re: REQUEST
        321310 by: Last Hacker Always onpoint
        321326 by: musicdev

php links doest work when im using mod rewrite
        321311 by: Farzan Dalaee
        321313 by: Julian Wanke
        321314 by: Farzan Dalaee
        321317 by: Adam Szewczyk
        321318 by: Julian Wanke
        321320 by: Tamara Temple

Re: How to enable cURL php extension on Debian Wheezy?
        321312 by: Adam Szewczyk
        321315 by: Adam Szewczyk
        321316 by: Csanyi Pal
        321319 by: Tamara Temple
        321321 by: Csanyi Pal
        321323 by: Tamara Temple
        321327 by: Csanyi Pal

Re: URL Rewriting
        321322 by: Tamara Temple

sorry for the blast from the past
        321324 by: Tamara Temple
        321325 by: Daniel

browser rendering
        321328 by: georg

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
very funny how big a novice i can be.


On Wed, May 29, 2013 at 1:48 PM, Stuart Dallas <stu...@3ft9.com> wrote:

> On 29 May 2013, at 17:26, Last Hacker Always onpoint <
> lasthack...@gmail.com> wrote:
>
> > HEY GUYZ I KNOW, I KNOW THIS IS NOT A PLACE FOR SOMETHING LIKE THIS SO
> BUT
> > HEY I HAVE A LITTLE TINY QUESTION FOR MY COOL GUYZ.
> >
> > DOES ANYONE HERE USE A SIMPLY MACHINE FUNCTION SCRIPT? BECAUSE THE
> > SCRIPTINGS ARE A LITTLE HARD FOR ME TO UNDERSTAND PLEASE LET ME KNOW
> GUYS I
> > WANT SOMEONE TO TEACH ME.
>
> SIMPLE MACHINES FORUM, not SIMPLY MACHINE FUNCTION. Funny how a couple of
> incorrect words can turn a simple question in to gobbledygook!
>
> As for your problems with the product, which I'm guessing are legion, try:
> http://support.simplemachines.org/
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>

--- End Message ---
--- Begin Message ---
On Wed, May 29, 2013 at 12:26 PM, Last Hacker Always onpoint <
lasthack...@gmail.com> wrote:

> HEY GUYZ I KNOW, I KNOW THIS IS NOT A PLACE FOR SOMETHING LIKE THIS SO BUT
> HEY I HAVE A LITTLE TINY QUESTION FOR MY COOL GUYZ.
>
> DOES ANYONE HERE USE A SIMPLY MACHINE FUNCTION SCRIPT? BECAUSE THE
> SCRIPTINGS ARE A LITTLE HARD FOR ME TO UNDERSTAND PLEASE LET ME KNOW GUYS I
> WANT SOMEONE TO TEACH ME.
>

This type of behavior is quite common among people that do not understand
the difference between HELLO and hello.  That aside, what is a "simple
machine function"?  Further, I always find it surprising that people want
to learn "hard to understand" concepts without the least bit of research.
Considering how much information is available to any individual
online...I'm even more surprised that questions like this make it into
these lists.

Five words: Read a book! or google!

--- End Message ---
--- Begin Message ---
i starting to use mod rewrite but all my images or js links doest work
my current query string is:
index.php?r=blog&page=2
i want to change it with this:
/blog/2
this is my .htaccess file
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1&page=$2 [L]

but none of my js or css cant find

i need a way with php to make urls
thanks

--- End Message ---
--- Begin Message ---
Try to add

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

that should exclude existing files and directories from rewriting...
Am 01.06.2013, 22:39 Uhr, schrieb Farzan Dalaee <farzan.dal...@gmail.com>:

i starting to use mod rewrite but all my images or js links doest work
my current query string is:
index.php?r=blog&page=2
i want to change it with this:
/blog/2
this is my .htaccess file
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1&page=$2 [L]

but none of my js or css cant find

i need a way with php to make urls
thanks

--- End Message ---
--- Begin Message ---
thanks for answer but it doesnt work
404 Not Found - http://localhost/framework/blog/files/upload/images/
but my images folder in:

http://localhost/framework/files/upload/images/


On Sun, Jun 2, 2013 at 1:11 AM, Julian Wanke <jswp...@gmx.at> wrote:

> Try to add
>
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
>
> that should exclude existing files and directories from rewriting...
> Am 01.06.2013, 22:39 Uhr, schrieb Farzan Dalaee <farzan.dal...@gmail.com>:
>
>
>  i starting to use mod rewrite but all my images or js links doest work
>> my current query string is:
>> index.php?r=blog&page=2
>> i want to change it with this:
>> /blog/2
>> this is my .htaccess file
>> RewriteEngine On
>> RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1&page=$2 [L]
>>
>> but none of my js or css cant find
>>
>> i need a way with php to make urls
>> thanks
>>
>

--- End Message ---
--- Begin Message ---
This is more of an apache question.

You can try below url.

http://lmgtfy.com/?q=mod_rewrite+exclude+css

On 1 June 2013 21:39, Farzan Dalaee <farzan.dal...@gmail.com> wrote:

> i starting to use mod rewrite but all my images or js links doest work
> my current query string is:
> index.php?r=blog&page=2
> i want to change it with this:
> /blog/2
> this is my .htaccess file
> RewriteEngine On
> RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1&page=$2 [L]
>
> but none of my js or css cant find
>
> i need a way with php to make urls
> thanks
>



-- 
A.

--- End Message ---
--- Begin Message ---
localhost means the files are stored on your computer so I can't access them ;)

Wait, you are trying to change the image directories? I'm a bit confused.

Am 01.06.2013, 22:44 Uhr, schrieb Farzan Dalaee <farzan.dal...@gmail.com>:

thanks for answer but it doesnt work
404 Not Found - http://localhost/framework/blog/files/upload/images/
but my images folder in:

http://localhost/framework/files/upload/images/


On Sun, Jun 2, 2013 at 1:11 AM, Julian Wanke <jswp...@gmx.at> wrote:
Try to add

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

that should exclude existing files and directories from rewriting...
Am 01.06.2013, 22:39 Uhr, schrieb Farzan Dalaee <farzan.dal...@gmail.com>:


i starting to use mod rewrite but all my images or js links doest work
my current query string is:
index.php?r=blog&page=2
i want to change it with this:
/blog/2
this is my .htaccess file
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /framework/?r=$1&page=$2 [L]

but none of my js or css cant find

i need a way with php to make urls
thanks




--
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/

--- End Message ---
--- Begin Message ---
Farzan,

I don't have a direct answer to your question, but I work a lot with a
wiki application called PmWiki that does something very similar to what
you are doing.

Their instructions for using "clean urls" such as
http://example.com/blog/2 (only in their syntax) can be seen here:

http://www.pmwiki.org/wiki/Cookbook/CleanUrls

I don't know if that will help at all, but I've used it successfully.



--- End Message ---
--- Begin Message ---
On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote:
> Hi,
> 
> I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP
> extension: I can't enable it.
> 
> I have installed following packages related to this issue:
> curl, libcurl3, libcurl3-gnutls, php5-curl.
> 
> I have in
> /etc/php5/mods-available/curl.ini
> ; configuration for php CURL module
> ; priority=20
> extension=curl.so
> 
> I know that cURL extension is not enabled because I want to install
> Moodle and it complains about cURL extension.
> 
> How can I solve this problem?

Hi,

what error message do you get?

Also, have you restarted apache after installing the extension?

Regards,
A.

--- End Message ---
--- Begin Message ---
On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote:
> Hi,
> 
> I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP
> extension: I can't enable it.
> 
> I have installed following packages related to this issue:
> curl, libcurl3, libcurl3-gnutls, php5-curl.
> 
> I have in
> /etc/php5/mods-available/curl.ini
> ; configuration for php CURL module
> ; priority=20
> extension=curl.so
> 
> I know that cURL extension is not enabled because I want to install
> Moodle and it complains about cURL extension.
> 
> How can I solve this problem?

Hi,

what error message do you get?

Also, have you restarted apache after installing the extension?

Regards,
A.

--- End Message ---
--- Begin Message ---
Adam Szewczyk <adam...@gmail.com> writes:

> On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote:
>> Hi,
>> 
>> I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP
>> extension: I can't enable it.
>> 
>> I have installed following packages related to this issue:
>> curl, libcurl3, libcurl3-gnutls, php5-curl.
>> 
>> I have in
>> /etc/php5/mods-available/curl.ini
>> ; configuration for php CURL module
>> ; priority=20
>> extension=curl.so
>> 
>> I know that cURL extension is not enabled because I want to install
>> Moodle and it complains about cURL extension.
>> 
>> How can I solve this problem?
>
> Hi,
>
> what error message do you get?
>
> Also, have you restarted apache after installing the extension?

Yes, I have restarted apache after installing the extension.

It is interesting.. that when I switch to English language for
Moodle installation ( on the web interface ), then I get not this error,
but if I switch back to Hungarian language for installation, I get it
again. 

The info.php file with the content of:
<?
 phpinfo();
?>

should show the enabled cURL extension?

-- 
Regards from Pal


--- End Message ---
--- Begin Message ---
Csanyi Pal <csanyi...@gmail.com> wrote:
> I have installed following packages related to this issue:
> curl, libcurl3, libcurl3-gnutls, php5-curl.

All good.

> I have in
> /etc/php5/mods-available/curl.ini
> ; configuration for php CURL module
> ; priority=20
> extension=curl.so

Have you enabled the extension as well? That looks like the standard
set-up, which means that curl.ini is available, but you still have to
enable it. Check in /etc/php5/conf.d to see if there's a symlink in
there, otherwise look through the various bits to see if it's included
somewhere in one of the stock php.ini files.

Here's an example from one of my servers:

tamara@gandimouse /etc/php5$ ll mods-available/
total 4.0K
-rw-r--r-- 1 root root 66 Sep 15  2012 pdo.ini

tamara@gandimouse /etc/php5$ ll conf.d/
total 0
lrwxrwxrwx 1 root root 25 Sep 24  2012 10-pdo.ini -> ../mods-available/pdo.ini

If you make changes here, ensure you restart your sever.


--- End Message ---
--- Begin Message ---
Tamara Temple <tamouse.li...@gmail.com> writes:

> Csanyi Pal <csanyi...@gmail.com> wrote:
>> I have installed following packages related to this issue:
>> curl, libcurl3, libcurl3-gnutls, php5-curl.
>
> All good.
>
>> I have in
>> /etc/php5/mods-available/curl.ini
>> ; configuration for php CURL module
>> ; priority=20
>> extension=curl.so
>
> Have you enabled the extension as well? That looks like the standard
> set-up, which means that curl.ini is available, but you still have to
> enable it. Check in /etc/php5/conf.d to see if there's a symlink in
> there, otherwise look through the various bits to see if it's included
> somewhere in one of the stock php.ini files.

Yes, it's enabled, because I have in 
/etc/php5/conf.d/ directory the symbolic link
@20-curl.ini

that is pointing to
-> ../mods-available/curl.ini

> If you make changes here, ensure you restart your sever.

I already restarted apache2 after I made changes there.

Still get error message when want to proceed with Moodle installation:
must be installed and enabled

The cURL PHP extension is now required by Moodle, in order to
communicate with Moodle repositories.

and it is not OK, the Moodle installation procedure can't find the cURL
extension. Why?

-- 
Regards from Pal


--- End Message ---
--- Begin Message ---
Csanyi Pal <csanyi...@gmail.com> wrote:
> It is interesting.. that when I switch to English language for
> Moodle installation ( on the web interface ), then I get not this error,
> but if I switch back to Hungarian language for installation, I get it
> again. 

I am completely unfamiliar with Moodle, have no idea what it is or how
it works with I18n stuff. But, if it works in one language and not the
other, the problem probably isn't with curl, or necessarily with the php
configuration, either.

When you switch to Hungarian, what are the actual errors you are seeing?
Stick the log in a gist or pastebin so it doesn't get mangled by email.

> The info.php file with the content of:
> <?
>  phpinfo();
> ?>
> 
> should show the enabled cURL extension?

I missed this one, somehow.

Yes, exactly, the cURL module should show up on phpinfo() output.


--- End Message ---
--- Begin Message ---
Tamara Temple <tamouse.li...@gmail.com> writes:

> Csanyi Pal <csanyi...@gmail.com> wrote:
>> It is interesting.. that when I switch to English language for
>> Moodle installation ( on the web interface ), then I get not this
>> error, but if I switch back to Hungarian language for installation, I
>> get it again. 
>
> I am completely unfamiliar with Moodle, have no idea what it is or how
> it works with I18n stuff. But, if it works in one language and not the
> other, the problem probably isn't with curl, or necessarily with the
> php configuration, either.

It doesn't work in Englis language either, just at this step of Moodle
installation on the web interface, it doesn't complain for the missing
cURL extension. But, when I proceed with the installation in English
language, I come to the step where it shows up again the missing cURL
extension. 

> When you switch to Hungarian, what are the actual errors you are
> seeing? 
> Stick the log in a gist or pastebin so it doesn't get mangled by
> email. 

I get no error message at this step of Moodle installation, when I use
Hungarian language.

>> The info.php file with the content of:
>> <?
>>  phpinfo();
>> ?>
>> 
>> should show the enabled cURL extension?
>
> I missed this one, somehow.
>
> Yes, exactly, the cURL module should show up on phpinfo() output.

Well, the phpinfo() output doesn't show up the cURL module yet.

I have the following directories and files in the 

/etc/php5/ directory:

 /apache2 directory with the content:
   php.ini file
   /conf.d subdirectory with the content:
     gd.ini
     ..
     xcache.ini

     But here I don't have
     curl.ini
     xmlrpc.ini

     and I think that that it should be here curl.ini, xmlrpc.ini

     Why is not here curl.ini?


 /conf.d directory with the content:
   @10-pdo.ini
   @20-curl.ini
   ..
   @20-xmlrpc.ini
   ldap.ini

 /mods-available subdirectory with the files:
   curl.ini
   ..
   xmlrpc.ini

 /cgi directory
 /cli directory


-- 
Regards from Pal


--- End Message ---
--- Begin Message ---
Silvio Siefke <li...@silvio-siefke.de> wrote:
> On Wed, 22 Jun 2011 17:50:49 -0400 Daniel P. Brown wrote:
> > > Has someone a Link with Tutorials or other Information?
> > 
> >     Not entirely sure what you're asking here, or how you (or the
> > nginx folks) expect it to relate to PHP.  Do you mean that you want to
> > use PHP to have theme2.php act as if it was called as theme.php?id=2 ?
> 
> I have me write a blog, but my blog has link like blogdetail.html?id=1 or =2
> through 16 at moment. And for google and other Search  Engines not good the
> links, better where i can rewrite to a fix link, and when someone use the
> link, php write to correct url. 

Common SEO mythology is that you need pretty human-understandable
links. (In point of fact, the search engines care not in the least.)
However, human-understandable URLs are a benefit to users when they want
to understand what they're linking to or clicking on.

A human-understandable link is more like:

    http://www.example.com/blog/2013-05-a-day-in-the-life-of-my-dog

not:

    http://www.example.com/blog/2

as that really does not provide any more information than:

    http://www.example.com/blog.php?id=2

Otherwise, Daniel's solution below should do the trick.

> Sorry my english not perfect on earth. 
> 
>  
> >     If so, it's not redirect or rewrite, and it's extremely hacky, but
> > this is the only real way PHP could achieve the desired result:
> > 
> > <?php
> > // dynamictheme.php
> > 
> > if (preg_match('/.*([0-9]+)\.php/Ui',$_SERVER['PHP_SELF'],$match)) {
> >   $_GET['id'] = $match[1];
> >   include dirname(__FILE__).'/theme.php';
> > }
> > 
> > ?>
> > 
> >     Then just symlink dynamictheme.php to your various themes like so:
> > 
> >     ln -s dynamictheme.php theme2.php
> >     ln -s dynamictheme.php theme301.php
> >     ln -s dynamictheme.php theme18447.php
> > 







--- End Message ---
--- Begin Message ---

Sorry for replying to a message from 2011 -- for some reason I had a
whole bunch of PHP messages suddenly show up in my inbox from the
past. I generally don't check the year of an unread message in my inbox,
as I try to keep inbox-zero.

Anyway, carry on!


--- End Message ---
--- Begin Message ---
On Sun, Jun 2, 2013 at 11:02 AM, Tamara Temple <tamouse.li...@gmail.com> wrote:
>
>
> Sorry for replying to a message from 2011 -- for some reason I had a
> whole bunch of PHP messages suddenly show up in my inbox from the
> past. I generally don't check the year of an unread message in my inbox,
> as I try to keep inbox-zero.
>
> Anyway, carry on!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

It all good, it happens :)

--- End Message ---
--- Begin Message ---
Possibly this issue is for other fora, which you might direct me, anyways;

I have been dablling making my own little webpages, however having gotten a nice result jon fireforx, I realize picture sizes gets treated very differntly on different browsers !!! so the looks of the pages get very strange from smaller (Opera) and much bigger (Explorer)
brower !!!

any hints for mitigation ?

br georg
--- End Message ---

Reply via email to