Developer(s) | Apple Inc. |
---|---|
Stable release | 2.11 / August 18, 2018; 22 months ago[1] |
Operating system | Classic Mac OS, macOS |
Type | Source code editor |
License | Proprietary |
Website | developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/GettoKnowScriptEditor.html |
CoffeeCup HTML editor is not the ideal code editor for many other languages but if you want to learn writing PHP, HTML, and CSS, then Coffee Cup HTML editor is a good place to start. CoffeeCup HTML Editor costs $69 with a limited free trial version available for download. Espresso is a web development tool for Mac. Mac yosemite free download. Hathi Download Helper. 2020-02-11: Version 1.1.9 released.
Script Editor (called AppleScript Editor from 2009 to 2014) is a code editor for the AppleScript scripting language, included in classic Mac OS and macOS.
AppleScript Editor provides basic debugging capabilities and can save AppleScripts as plain text (.applescript), as a compiled script (.scpt), as a script bundle (.scptd), or as an application (.app). AppleScript Editor also handles script dictionary files, allowing the user to see what scripting classes and commands are available for each scriptable application installed on the computer.
Prior to Mac OS X 10.3, Script Editor was developed using Carbon. 10.3 introduced a new Script Editor written using Cocoa. From Mac OS X 10.6 to 10.10, it was called AppleScript Editor. It likely regained its original name because of the introduction of JavaScript for Automation.
Click here to return to the '10.3: Where to find and edit the php.ini file' hint |
Create a phpfile containing
<?php
echo info() ;
?>
and it'll display lots of PHP related info including the location of the php.ini file (or to be more correct - where PHP will look for one...)
You dropped the semicolon.
<? phpinfo(); ?>
---
_____________________________
My other sig is really witty.
Damn - I was to quick on the keyboard - YES I meant
<?php
echo phpinfo() ;
?>
Sorry for the confusion!
I did it again - there is no need to use 'echo'...
Another option is to put commands in .htaccess files. You have to ensure they are activated for the server but it does make it easy to seperate areas of your server. For example to run an old program where Register Globals must be on while developing your killer app in a seperate area with Register Globals turned off.
in the .htaccess file the entry would look like this:php_flag register_globals on
Better yet, if you have access to edit the php.ini file, you probably have access to edit your site's .conf file.
Given that, you should probably set a per-directory access option for your virtual host because
1. Virtual Host options are faster than parsing .htaccess files (read the Apache docs for why this is)
2. You'll need to check your .conf file anyway to make sure it has its AllowOverride option set to recognize .htaccess files at all.
So set the directory option.
For the sake of illustration, say you have a PHP-based forum installed in your document root in a folder called 'forum' and it requires PHP register_globals on. Inside your Virtual Host you'd add this block of text:
<Directory '::absolute path to your document root::/forum'>
php_flag register_globals on
</Directory>
Simple. Save the .conf file. sudo apachectl graceful. You're golden. Every PHP script inside that directory (and recursively within, I believe) will now recognize register_globals on.
Don't believe me? save
<? phpinfo(); ?>
to a file named, say, phpinfo.php within the forum directory and look on the page for register_globals.
Note, that syntax above for php_flag will not work on Apache 2. But if you're running Apache 2 on OS X, then you probably already know enough about Apache administration to not need this hint in the first place.
---
_____________________________
My other sig is really witty.
I agree that apache .conf files are the easiest way to do this. Also, the php configuration directives are not restricted to Directory containers, they can be used in a VirtualHost container. This is a great way to change settings for one php driven website without affecting all of your php driven websites.
In general, I agree with wallyfoo, but you might want to stick it in .htaccess if it is a short-term solution, while hunting down and clobbering your globals. That way, you can quickly turn it off an on for debugging, but you have to restart Apache every time you change http.conf.
---
: Jan Steinman, Bytesmiths
Does it include the CLI version?
4.3.2, and yes it does.
Its always a good idea to keep register_globals turned off if possible. Just as in C/C++ programming, making every variable a global variable just for the sake of being easy is poor programming practice and can lead to some very serious security flaws.
Also, anyone familiar with *nix should know that to locate any file, just use:
find / grep 'php.ini'
and it'll search through the drive and give you a list of results.
As such searching for the non-existant file isn't particularly helpful.
Since the CLI version gets installed, the easiest way is probably to extract the path from the phpini output, as it's already noted above: Theoretically of course it's perfectly possible to have the Apache SAPI copy of the PHP interpreter and the CLI version point to different php.ini paths, so it's not a bad idea checking the phpinfo() output via a web browser.
On my clean install of 10.3, I wound up with php.ini.default in /etc, and I know I didn't put it there!
-rob.
It's probably because a lot of people asked 'where IS that php.ini' in previous versions of X' and it took them a long time to realise that they had to create (copy) it themselves...
Horribly inefficient.
Run this command from the terminal:
sudo find / -name php.ini -print
That will only spit out files called 'php.ini'. Your grep will spit out files that contain php.ini in them.
Horribly inefficient.
locate php.ini
$someGlobalVariable
becomes$_GET['someGlobalVariable']
---
: Jan Steinman, Bytesmiths
Thanks for the tip. After making a php.ini file and copying it to /etc, I tried stopping and restarting Apache using apachectl stop
and apachectl start
(normally that has worked fine when I've made changes to httpd.conf)
But when I reloaded my phpinfo() file, it showed register_globals still were off.
So I stopped and restarted Personal Web Sharing in System Preferences. Checking phpinfo() again, that worked. I am probably missing something basic here, but I thought apachectl stop/start
were the same thing.
Isn't there a Terminal command that will cause php to reload after making changes to php.ini?
/etc is an alias to /private/etc