Re: MAMP on Mac OS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I haven't tested "MAMP" software.
I can only suggest to try with XAMPP:
www.apachefriends.org

Regards

El 28/7/24 a les 23:57, JEFFRY KILLEN ha escrit:
Hello;

I have not posted here for some time.

But now I have encountered and issue with a php project that works on my remotely hosted web site
but does not work on my MacOS Sonoma localhost MAMP installation.

The project I was developing was a project to figure out how to use get queries to load resources and bypass the normal web client to server requests that originate from HTML. Specifically, css rules including
image urls, javascript and html img element src attributes.

I have it all working in an on line installation: jekillen.com/lab_51 <http://jekillen.com/lab_51>.

The php code is not visible, as is the normal state of affairs. But it uses various screening techniques to screen out  unauthorized requests (from people intent on stealing intellectual property).

But I was recently working on another project and had an instance where I needed to retrieve and copy some code. That led me to my localhost installation of this 'lab 51' project.

I found that in the local lab 51 project, nothing was being loaded: background tile image source and image element in the visible page that works as a sample to demonstrate the mechanisms

the following is code I have in the section of the page BEFORE the DOCTYPE declaration:

if($_GET['tag'])
     {
      if(file_exists($_path.$_imgList[$_GET['tag']]))
        {
         switch($_SERVER['HTTP_REFERER'])
           {
            case $_filePath.'?src=lab_51&type=css':
            case $_filePath:
            (new _IMG_SERVER(''))->serv($_GET);
            exit;
           }
         print 'access denied';
         exit;
        }
      else
        {
         header('HTTP/1.0 404 Not Found');
         exit;
        }
     }

This is the CSS request markup in the same page:
<link rel="stylesheet" type="text/css" href="./?src=lab_51&amp;type=css" media="screen" />

What happens is not PHP complains, no HTML problems (the 404 error does not appear) and no "access denied" message. This message would show up in the network activity
displayed in the browsers developer tools.

The issue seems to be with the $_SERVER super globals.

does anyone have enough specific recent experience with MacOS and is treatment of web based resources
and/or MAMP that might effect this?

--------------------------
I have done some more digging and found this message in Safari developer tools/networking: The resource was requested insecurely. Firefox, my main development browser, was giving the request denied message.
SO, does this mean that localhost has to used SSL?
The MAMP server runs on port 8888. How does that effect it?

Thank you for time and attention
JK

--

Narcis Garcia

__________
I'm using this dedicated address because personal addresses aren't masked enough at this mail public archive. Public archive administrator should remove and omit any @, dot and mailto combinations against automated addresses collectors.



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux