wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Your host has disabled url file access maybe as a result of safe_mode being enabled, Which will mean you wont be able to access remote files using include/require or file_get_contents/fopen Also note that if your include a file using the http:// protocol you are not actually including the PHP source code but the output of the script itself which will be text/html.
-
Look into using floats. Using absolute position is not recommended.
-
Why would you want to use a VARCHAR datatype to store integers? VARCHAR is used to store small strings - maximum length would be 255 characters. Use INT datatype to store integers.
-
Directory Index needs to be one word: DirectoryIndex index.php However I would recommend you to have a word with your hosts about this though. Maybe they forgot to add index.php to the DirectoryIndex.
-
Installation problems - php.ini
wildteen88 replied to kinda's topic in PHP Installation and Configuration
okay try this. comment out any extensions your have enabled within the php.ini - add a # at the start of the line to comment lines out. Also enable a setting called display_startup_errors. Save the php.ini and restart Apache. Has PHP managed to find your php.ini? Note: Ignore the Configuration File (php.ini) Path line. Only the Loaded Configuration File line needs to be set correctly. Also how have you configured Apache with PHP? Apache Module or CGI? And where is the PHPIniDir directive located within the httpd.conf -
Why can't it load php_mysql.dll?
wildteen88 replied to Ross4PHP's topic in PHP Installation and Configuration
Search your computer for any files called libmysql.dll Rename/remove any found files. Making sure you keep libmysql.dll in PHP and MySQL's folders. As you had php3 installed previously there maybe old php extension left behind by uninstallation process. -
Rather than copy 'n paste the code into your post attach your php file(s) to your next post.
-
Unless you mistyped or something remove the ^ from infront of E_ALL. If you do that error reporting wont work.
-
PHP is not the only server sided language to be used. There are others such as ASP, JSP, Perl, Ruby on Rails (ROR). PHP is the most commonly used language though as it is easy learn, free, has wide support base, supported by most webhosts. Wiki: Server Side Languages
-
If you are wanting to change the location in which Apache serves up files from then yes you'll need to set both directives to the new path. Apache and PHP can be installed many ways. The best way is a manual installation however most people go the easy root and install a pre-configured package like WAMP. I myself install AMP manually.
-
Why can't it load php_mysql.dll?
wildteen88 replied to Ross4PHP's topic in PHP Installation and Configuration
I would recommend you to add PHP to the PATH Environment Variable Once added to the PATH PHP should be able to load the mysql extension. The mysql extensions requires an external library called libmysql.dll (located in the root of PHPs folder). -
If you have installed the wamp package from wampserver.com then you should not need to configure anything as everything is pre-configured once installed. You should save your web files in C:/wamp/www and then go to http://localhost/ in order to run your .php scripts
-
Make sure php is reading the php.ini you are editing by running the phpinfo() function. Also ensure that the line your are editing within the the php.ini does not start with a #. Lines that start with # are considered as comments. For errors to be reported during runtime error_reporting should be set to atleast E_ALL and display_errors should be set to on. Save the php.ini and restart Apache for changes to take affect
-
That course most probably teaches your how to use the CakePHP framework. Before taking such a course make sure your have an understanding of the basics. For learning the basics the best place to go is reading the manual at php.net
-
Tidied up your code a bit, try: <?php // Connect database mysql_connect("localhost","XXXX",""); mysql_select_db("YYY"); if(isset($_GET['select']) && !empty($_GET['select'])) { $select = $_GET['select']; // Get records from database (table "name_list"). $result = mysql_query("select * from name_list where id='$select'"); $row = mysql_fetch_assoc($result); $content = 'Information about <strong>' . $row['name'] . '</strong> FAMILY...</p> <p>........................................<br> ........................................<br> ........................................'; } else { $content = 'No Name Selected'; } ?> <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <form id="form1" name="form1" method="get" action="<? echo $_SERVER['PHP_SELF']; ?> "> PERSON : <select name="select"> <option value="">--- Select ---</option> <?php // Get records from database (table "name_list"). $list = mysql_query("select * from name_list order by id asc"); // Show records by while loop. while($row_list = mysql_fetch_assoc($list)) { $opt = '<option value="' .$row_list['id'] . '"'; if($row_list['id'] == $select) { $opt .= ' selected="selected"'; } $opt .= '>' . $row_list['name'] . "</option>\n"; echo $opt; } ?> </select> <input type="submit" name="Submit" value="Select" /> </form> <hr> <p><?php echo $conent; ?></p> </body> </html>
-
Try reinstalling wamp. I do not use WAMP myself so I cannot suggest anything however a reinstall should help.
-
$select should be $_GET['select'] Your code is dependent on register_globals being enabled. register_globals has since been depreciated and is being removed in PHP6. The reason for this is because it can lead to security exploits within your code. Try to update your code to the newer superglobals
-
If you have WAMP2 installed then everything should setup and ready to go. No configuration should be necessary. Make sure wamp is running and your are going http://localhost in order to run your php scripts. Also make sure you are saving your php files in WAMPs web data directory which I believe is C:\wamp\www You should not be opening your php files directly through the browser via File > Open or right clicking on a .php file and selecting Open with IE
-
Could you post some dummy data? It is possible for foreach to loop thought two arrays at a time.
-
Mysql and postGreSQL are two completely different databases. They should not interfere with each other. Note: If you want to use postGreSQL with PHP you'll need to enable the postgreSQL extension within the php.ini.
-
I don't think mysql can write database data in several locations. It can only be written to one location which will be C:\xampp\mysql As for hosting your site from C:\mysite you will need to change the DocumentRoot directive within Apache's configuration file. Note: Doing this will stop the xampp portal from working as your have changed the location in which Apache servers files from. If you still want the Xampp portal to work you will either have to add in an Alias or setup a VirtaulHost.
-
Why are your saving your files in C:\wamp\files. It should be C:\wamp\www Also your web browser should not read C:\wamp\files\index.html it should be http://localhost <- you have to go to that address first What is aestan tray manager? You should be using the Wamp tray manager. Read the following page on how to use wamp: http://www.wampserver.com/en/presentation.php
-
Why did you recompile PHP? PHP does not need recompiling on Windows. Also please read the following FAQ
-
Umm, simple: if( expression ) { if( expression ) { } }
-
Installing PHP only through FTP
wildteen88 replied to derf's topic in PHP Installation and Configuration
You have to configure your webserver in order to install PHP. You cannot just upload PHP to the server and expect it to work. You will need to be the server administrator in order install PHP. What are you trying to do?