[PHP] URL problem
I have a following directory: - folder (site) index.php - folder (example) index.php the url to this directory will be: http://www.example.com/site/index.php but I need redirect with: header() function to the index.php inside the folder example without the url change I mean, I want to keep the same url but diferent directory -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio.
RE: [PHP] URL problem
If you are in a *nix environment, make a symlink from site_folder/index.php - site_folder/example_folder/index.php and that should do it. Shaunak Kashyap Senior Web Developer WPT Enterprises, Inc. 5700 Wilshire Blvd., Suite 350 Los Angeles, CA 90036 Main: 323.330.9900 www.worldpokertour.com Confidentiality Notice: This e-mail transmission (and/or the attachments accompanying) it may contain confidential information belonging to the sender which is protected. The information is intended only for the use of the intended recipient. If your are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking of any action in reliance on the contents of this information is prohibited. If you have received this transmission in error, please notify the sender by reply e-mail and destroy all copies of this transmission. -Original Message- From: Jesús Alain Rodríguez Santos [mailto:[EMAIL PROTECTED] Sent: Friday, February 17, 2006 2:49 PM To: php-general@lists.php.net Subject: [PHP] URL problem I have a following directory: - folder (site) index.php - folder (example) index.php the url to this directory will be: http://www.example.com/site/index.php but I need redirect with: header() function to the index.php inside the folder example without the url change I mean, I want to keep the same url but diferent directory -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL problem
Hi! I'm passing this url to the script: http://www.fttta.com/auction.php and intercepting it with: if ($_SERVER['QUERY_STRING'] = ) { disp_cat(); } However, nothing is happening. phpinfo show $_SERVER['QUERY_STRING'] as 'no value', so this should work. Anyone know why this doesn't work?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
Re: [PHP] URL problem
Sparky Kopetzky wrote: and intercepting it with: if ($_SERVER['QUERY_STRING'] = ) { disp_cat(); } However, nothing is happening. phpinfo show $_SERVER['QUERY_STRING'] as 'no value', so this should work. Anyone know why this doesn't work?? Yes. You are using an assignment operator where you should be using a comparison operator. Try using == (or ===): if ($_SERVER['QUERY_STRING'] == ) { disp_cat(); } http://us4.php.net/manual/en/language.operators.assignment.php http://us4.php.net/manual/en/language.operators.comparison.php Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Url problem
OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: include_once $SYSTEM_URL . /classes/category.php; where $SYSTEM_URL = http://www.example.com; is the url to the web site. and I get this error: Fatal error: Cannot instantiate non-existent class: category in c:\program files\apache group\apache\htdocs\index.php on line 19 So, obviously, it's not pointing to the right place. I can load the opening page from the url, so I know Apache is trying to load from the htdocs folder. Help... :o(( Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
Re: [PHP] Url problem
On Friday 13 June 2003 04:55, Sparky Kopetzky wrote: I'm trying this, it doesn't work and I can't figure out why: include_once $SYSTEM_URL . /classes/category.php; where $SYSTEM_URL = http://www.example.com; is the url to the web site. and I get this error: Fatal error: Cannot instantiate non-existent class: category in c:\program files\apache group\apache\htdocs\index.php on line 19 So, obviously, it's not pointing to the right place. I can load the opening page from the url, so I know Apache is trying to load from the htdocs folder. Short answer: you can't include files like that through a URL Shorter answer: RTFM, study the examples -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The only winner in the War of 1812 was Tchaikovsky. -- David Gerrold */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache/PHP URL problem
Just noticed a strange problem with one of my business servers. It's configured identically (afaik) to all of my other servers (which do not exhibit this behavior), with Apache 1.3.20 and PHP 4.0.6, running on Linux Mandrake 7.2. The problem occurs only when requesting PHP documents. Say, for example, I have a PHP script at: http://www.example.com/myphpscript.php For some reason, I can also access this page via: http://www.example.com/myphpscript On top of that, I seem to be able to pass a whole bogus path afterwards: http://www.example.com/myphpscript/blah/blah/blah/and/so/on/etc/ ...and the page (myphpscript.php) is still displayed properly. It's not really a big deal, but I had some prick with too much time on his hands taking advantage of this, filling my logfiles with thousands of requests for ~300-character URLs. This ONLY happens with files with the .php extension (not .html files) so I'm not sure if it's a problem with my Apache config, my PHP config, or what... Anyone have any clues? I've been through both the Apache and PHP docs a few times over, but can't seem to find anything relevant. Compiled Apache with: --prefix=/usr/local/apache --enable-module=ssl --enable-module=so --enable-m odule=log_agent --enable-module=log_referer --enable-module=proxy --enable-m odule=rewrite --enable-module=speling --enable-module=usertrack --enable-mod ule=vhost_alias And PHP with: --with-apxs=/usr/local/apache/bin/apxs --enable-versioning --with-mysql=/usr /local/mysql --enable-track-vars Any help would be appreciated! Helmut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Apache/PHP URL problem
This is standard PATH_INFO behaviour. I don't really see a DoS issue here. Use piped logs or something and teach your logging system not to log these if you have an issue with it. DoS from filling log files isn't something we can do much about. -Rasmus Just noticed a strange problem with one of my business servers. It's configured identically (afaik) to all of my other servers (which do not exhibit this behavior), with Apache 1.3.20 and PHP 4.0.6, running on Linux Mandrake 7.2. The problem occurs only when requesting PHP documents. Say, for example, I have a PHP script at: http://www.example.com/myphpscript.php For some reason, I can also access this page via: http://www.example.com/myphpscript On top of that, I seem to be able to pass a whole bogus path afterwards: http://www.example.com/myphpscript/blah/blah/blah/and/so/on/etc/ ...and the page (myphpscript.php) is still displayed properly. It's not really a big deal, but I had some prick with too much time on his hands taking advantage of this, filling my logfiles with thousands of requests for ~300-character URLs. This ONLY happens with files with the .php extension (not .html files) so I'm not sure if it's a problem with my Apache config, my PHP config, or what... Anyone have any clues? I've been through both the Apache and PHP docs a few times over, but can't seem to find anything relevant. Compiled Apache with: --prefix=/usr/local/apache --enable-module=ssl --enable-module=so --enable-m odule=log_agent --enable-module=log_referer --enable-module=proxy --enable-m odule=rewrite --enable-module=speling --enable-module=usertrack --enable-mod ule=vhost_alias And PHP with: --with-apxs=/usr/local/apache/bin/apxs --enable-versioning --with-mysql=/usr /local/mysql --enable-track-vars Any help would be appreciated! Helmut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]